tablePattern: Creates skeleton for frequency tables with desired values

Description Usage Arguments Value Author(s) Examples

View source: R/tablePattern.r

Description

Function takes values and creates a frequency table including these values. Models behavior of factor variables.

Usage

1
2
tablePattern (x, pattern = NULL, weights, na.rm = TRUE,
useNA = c("no", "ifany", "always"))

Arguments

x

a vector

pattern

desired values for table output

weights

optional: weights

na.rm

should missing values be removed

useNA

whether to include [NA] values in the table

Value

a frequency table

Author(s)

Sebastian Weirich

Examples

1
2
3
grades <- c(1,1,3,4,2,3,4,5,5,3,2,1)
table(grades)
tablePattern(grades, pattern = 1:6)

eatTools documentation built on Nov. 10, 2021, 5:07 p.m.