tabpct2: Tables with percentages

Description Usage Arguments Value Examples

View source: R/tabfunctions.R

Description

Produces one, two or multi-way tables with percentages

Usage

1
tabpct2(row, col = NULL, collab = "N", tex = FALSE, rowlab = NULL)

Arguments

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

Value

r x c matrix

Examples

1
2
3
4
5
6
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", "%"))

wadetj/timsRstuff documentation built on May 13, 2020, 3:31 a.m.