Description Usage Arguments Value Examples
Quick and simple function for creating contingency tables
1 | quick_table(x, na.rm = FALSE, order = c("frequency", "value", "none"))
|
x |
a vector or factor object |
na.rm |
should |
order |
how should the results be ordered, if any? |
A data.frame
with columns val
(the original values and class
of x
) and freq
(the count, or frequency, of each value in
x
, integer). The rows are sorted by frequency in descending order.
1 2 3 4 5 6 7 8 | set.seed(1)
m <- sample(c(rep(NA, 5), rpois(45, 3)))
quick_table(m)
x <- LETTERS[c(2, 2, 2, 2, 3, 1, 1)]
quick_table(x, order="freq")
quick_table(x, order="value")
quick_table(x, order="none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.