Description Usage Arguments Value Examples
Returns a sorted (descending) frequency tbl
1 2 3 |
.data |
Data |
... |
Unquoted column names of variables to include in table. Default is to use all columns. |
prop |
Logical indicating whether to include a proportion of total obs column. |
na_omit |
Logical indicating whether to exclude missing. If all responses are missing, a missing value is used as the single category. |
sort |
Logical indicating whether to sort the returned object. |
Frequency tbl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## generate example data
x <- sample(letters[1:4], 200, replace = TRUE)
y <- sample(letters[5:8], 200, replace = TRUE)
## count and sort frequencies for each vector
tabsort(x)
tabsort(y)
## combine x and y into data frame
dat <- data.frame(x, y)
## select columns and create freq table
tabsort(dat, x)
tabsort(dat, x, y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.