tables {ds} | R Documentation |
Tables of Categorical Variables
Description
Organizes various tables of categorical variables and tests tables (Chi-square and Fisher's exact test)
Usage
tables(data)
Arguments
data |
data is a data.frame |
Author(s)
Emmanuel Arnhold
emmanuelarnhold@yahoo.com.br
See Also
gds, dscor, dplot
Examples
treatments=gl(2, 30, labels = c("Control", "Treat"))
resultsA=rep(c("positive","negative", "positive","negative"),c(25,5,7,23))
resultsB=rep(c("positive","negative", "positive","negative"),c(28,2,8,22))
resultsC=rep(c("positive","negative", "positive","negative"),c(16,14,13,17))
data=data.frame(treatments,resultsA, resultsB, resultsC)
r=tables(data)
names(r)
r
r[1]
r[2]
r[6]
[Package ds version 4.0 Index]