tabpct2 | R Documentation |
Produces one, two or multi-way tables with percentages
tabpct2(row, col = NULL, collab = "N", tex = FALSE, rowlab = NULL)
row |
factor or numeric vector which will appear in rows |
col |
factor or numeric vector which will appear in columns |
collab |
character vector of column names |
tex |
output in tex format (TRUE/FALSE) |
rowlab |
character vector of row names |
r x c matrix
data(iris)
tabpct2(iris$Species)
iris$hilo<-cut(iris$Sepal.Width, breaks=2)
tabpct2(iris$Species, iris$hilo)
tabpct2(iris$Species, iris$hilo, collab=c("low", "Pct.", "hi", "Pct."))
tabpct2(iris$hilo, iris$Species, rowlab=c("low", "hi", "Total"), collab=c("set", "%", "vers", "%", "virg", "%"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.