Skip to content

Bug in ftable?? (Was: Two-way tables of data, etc)

1 message · BXC (Bendix Carstensen)

#
Thanks to Peter Dalgaard for the helpful hints aboy dimnames.
This will work:

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
dimnames( tp ) <- dimnames( tb )
ftable( tp )

Slightly clumsy, but a workaround.

Bendix C
----------------------
Bendix Carstensen
Senior Statistician
Steno Diabetes Centre
Niels Steensens Vej 2
DK-2820 Gentofte
Denmark
tel: +45 44 43 87 38
mob: +45 28 25 87 38
fax: +45 44 43 73 13
bxc at novo.dk
www.biostat.ku.dk/~bxc
----------------------
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._