search for: ftable

Displaying 20 results from an estimated 191 matches for "ftable".

Did you mean: table
2013 Mar 05
0
Patch for format.ftable()
Dear expeRts, Please find attached the .diff for a bug fix in R-devel 62124. format.ftable() fails to format ftable()s correctly which have no row.vars or no col.vars. That should work with the patch (the example code below also runs correctly for all the (new) 'method's). Cheers, Marius --8<---------------cut here---------------start------------->8--- (ft1 <- ftable...
2012 Dec 17
2
Suggestion: 'method' slot for format.ftable()
Dear R-developers, I would like to suggest a 'method' slot for format.ftable() (see an adjusted 'format.ftable()' below, taken from the source of R-2.15.2). At the moment, format.ftable() contains several empty cells due to the way the row and column labels are printed. This creates problems (= unwanted empty columns/rows) when converting an ftable to a LaTeX table...
2006 Mar 17
1
Wishlist: 'append' argument for write.ftable()
I would like to suggest that an 'append' argument be added to write.ftable(). This would allow, for example, the user to append ftable() output to a text report. I have attached an svn patch to ftable.R that makes the proposed change to write.ftable(). [A very trivial change since 'append' is simply passed to cat().] I have also attached a patch to read.ftable....
2012 Jan 26
1
ftable.formula
I apologize in advance if this is the wrong forum for this report/request, and for the fact that I have not read the code for ftable.formula in any detail. >From reading the documentation for ftable.formula, I expected that the following two calls to ftable would produce the same results: data(UCBAdmissions) ftable(UCBAdmissions, row.vars = "Dept", col.vars = c("Gender", "Admit")) ftable(UCBAdm...
2006 Jul 15
1
Some problems with latex(ftable)
The ftable structure is not an ordinary matrix. Instead, it has the body of the table with several cbind- and rbind-ed rows and columns of label information. The example in ?ftable has two row factors and two column factors. Continuing with the example in ?ftable, enter tmp <- ftable(mtcars$cyl, mtcar...
2001 Sep 05
3
Bug in ftable?? (Was: Two-way tables of data, etc)
...irregular, e.g. (for the sake of the argument): data( warpbreaks ) warpbreaks$variant <- rep( 1:5, len=54 ) attach( warpbreaks ) tb <- table( wool, tension, variant ) tb # in this case you would like to see: tp <- tapply( breaks, list( wool, tension, variant ), mean ) tp # and hardly: ftable( xtabs( breaks ~ wool + tension + variant ) ) # It would be nice to flatten the tabulations, so I tried: ftable( tb ) tp <- as.table( tp ) ftable( tp ) But here i get: > attr( tp, "class" ) <- "table" > ftable( tp ) Error in cbind(...) : number of rows of matrice...
2001 Sep 05
3
Bug in ftable?? (Was: Two-way tables of data, etc)
...irregular, e.g. (for the sake of the argument): data( warpbreaks ) warpbreaks$variant <- rep( 1:5, len=54 ) attach( warpbreaks ) tb <- table( wool, tension, variant ) tb # in this case you would like to see: tp <- tapply( breaks, list( wool, tension, variant ), mean ) tp # and hardly: ftable( xtabs( breaks ~ wool + tension + variant ) ) # It would be nice to flatten the tabulations, so I tried: ftable( tb ) tp <- as.table( tp ) ftable( tp ) But here i get: > attr( tp, "class" ) <- "table" > ftable( tp ) Error in cbind(...) : number of rows of matrice...
2020 May 13
7
justify hard coded in format.ftable
Dear all, I haven't received any feedback so far on my proposal to make "justify" argument available in stats:::format.ftable Is this list the appropriate place for this kind of proposal? I hope this follow-up to my message won't be taken as rude. Of course it's not meant to be, but I'm not used to the R mailing lists... Thank you in advance for your comments, Best, Thomas > Dear all, > > justif...
2020 May 15
0
ftable <-> data.frame etc {was "justify hard coded in format.ftable"}
>>>>> Gabor Grothendieck >>>>> on Thu, 14 May 2020 06:56:06 -0400 writes: > If you are looking at ftable could you also consider adding > a way to convert an ftable into a usable data.frame such as > the ftable2df function defined here: > https://stackoverflow.com/questions/11141406/reshaping-an-array-to-data-frame/11143126#11143126 > and there is an example of using it here: > https...
2014 Jan 10
0
proposal: stats::as.matrix.ftable method
Following some discussion on R-help, I'd like to propose that an as.matrix method be added to those available for ftable objects. The reason for this is that there are a variety of situations where one needs to flatten a 3+ way table, but then use that for analysis as a matrix, not just for pretty-printing. There is an as.table method to turn the result back to a table, but an as.matrix method is missing. >...
2008 Jul 02
1
exporting ftable
How can I export an ftable object in the same format that appears in R command window? For testing that i was using this example that is in help of this function. ## Start with a contingency table. ftable(Titanic, row.vars = 1:3) ftable(Titanic, row.vars = 1:2, col.vars = "Survived") ftable(Titanic, row.vars = 2:...
2007 Jan 18
4
Reading contingency tables
I am trying to read an ftable using read.ftable, but I get the following error message: > jobSatTable <- read.ftable("http://definetti.uark.edu/~gpetris/stat5333/jobSatisfaction.dat",skip=2) Error in seek(file, where = 0) : no applicable method for "seek" In addition: Warning messages: 1: no non-missi...
2011 May 27
1
How to convert an ftable object to a matrix including the row names?
Dear expeRts, What's the easiest way to convert an ftable object to a matrix such that the row names of the ftable object are shown in the first couple of columns of the matrix? This is (typically) required, for example, when the final goal is to print the matrix via xtable. Below is a rather complicated example of how to do it... Cheers, Marius ##...
2003 Mar 06
0
modifying ftable to allow percentages (wishlist) (PR#2606)
Full_Name: John Hendrickx Version: 1.6.2 OS: Windows XP Submission from: (NULL) (80.126.78.108) (This is not a bug report but a request to add a feature to future versions of R. Hope this is an appropriate place). I'd like to suggest adding an option to ftable to allow percentages. It would be easy to do and backwards compatible. Percentage tables are useful in educational contexts, whereas lack of a simple method for calculating percentages gives an incorrect impression of the maturity of R IMHO. To add percentage tables to ftable, an option such as p...
2008 Mar 12
1
ftable and xtabs
Hoping someone can help me with xtabs and ftable. I'm trying to get a pair of ftables (possibly more) next to each other. For example: > dunhill_lights_xtab<-ftable(xtabs(grossedupobs ~ gender+age_group + dunhill_lights, data = ciggs)) > dunhill_lights_xtab dunhill_lights No Yes gender age_gr...
2011 Jun 24
1
Converting an ftable (contingency table) to a dataframe in R
I am generating an ftable (by running ftable on the results of a xtabs command) and I am getting the following. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Var1? Var2 date ? ? ? ? ? ? ? ? group? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 2007-01-01? ? ? ? ? q1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?...
2007 Jun 23
2
latex of ftable (Hmisc?)
Dear latexRs, I tried to make a latex printout of a simple categorial ftable. It should look like the output of print.ftable. Any ideas how to get the syntax of summary.formula right. Or some alternative? As far I see, xtable does not have method for ftable. Dieter library(Hmisc) n=500 sex <- factor(sample(c("m","f"), n, rep=TRUE)) treatment <-...
2020 May 14
0
justify hard coded in format.ftable
Thanks for the links. I agree that such a feature would be a nice addition, and could make ftable even more useful. In the same spirit, I think it could be useful to mention the undocumented base::as.data.frame.matrix function in documentation of table and xtabs (in addition to the already mentioned base::as.data.frame.table). The conversion from ftable/table/xtabs to data.frame is a common ta...
2011 May 27
0
RE How to convert an ftable object to a matrix including the row names?
Okay, great, thanks :-) Marius On 2011-05-27, at 10:56 , david.hajage at curie.net wrote: > > Hi, > > Is this what you want ? > > ft <- ftable(Titanic, row.vars=1:3) > xtable(format(ft)) > > Best, > > david > > > Marius Hofert <m_hofert at web.de> > Envoy? par : r-help-bounces at r-project.org > 27/05/2011 07:41 > > A > Help R <r-help at stat.math.ethz.ch> > cc > Objet &gt...
2020 May 14
0
justify hard coded in format.ftable
...arious as.data.frame methods do not address the examples in the SO links I posted which is why I mentioned it. On Thu, May 14, 2020 at 9:22 AM SOEIRO Thomas <Thomas.SOEIRO at ap-hm.fr> wrote: > > Thanks for the links. I agree that such a feature would be a nice addition, and could make ftable even more useful. > > In the same spirit, I think it could be useful to mention the undocumented base::as.data.frame.matrix function in documentation of table and xtabs (in addition to the already mentioned base::as.data.frame.table). The conversion from ftable/table/xtabs to data.frame is a...