[R] Two-way tables of data, etc
Murray Jorgensen
maj at waikato.ac.nz
Wed Sep 5 07:47:50 CEST 2001
At 06:42 AM 5-09-01 +0100, Prof Brian D Ripley wrote:
>xtabs(content ~ block + treat)
>
>is almost what you gave, better labelled.
>
>The obvious (to me) tools are xtabs and ftable to flatten arrays.
Yes, excellent. Thank you.
The beginning of the xtabs documentation is a little misleading, though, as it
runs
>
> xtabs
> {base}
> R Documentation
> Cross Tabulation
> Description
>
> Create a contingency table from cross-classifying factors, usually contained
> in a data frame, using a formula interface.
and I normally expect a contingency table to contain counts.
Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz Fax +64-7 838 4155
Phone +64-7 838 4773 home phone +64-7 856 6705 Mobile +64-21 139 5862
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list