powered by
Function takes values and creates a frequency table including these values. Models behavior of factor variables.
tablePattern (x, pattern = NULL, weights, na.rm = TRUE, useNA = c("no", "ifany", "always"))
a frequency table
a vector
desired values for table output
optional: weights
should missing values be removed
whether to include [NA] values in the table
Sebastian Weirich
grades <- c(1,1,3,4,2,3,4,5,5,3,2,1) table(grades) tablePattern(grades, pattern = 1:6)
Run the code above in your browser using DataLab