Description Usage Arguments Details Value Examples
Function for cross tabulation of variables within a data.frame or data.frame like.
1 2 3 4 5 6 7 8 9 10 | tabit_x(x, ..., sort = 1, digits = 2, useNA = TRUE)
## S3 method for class 'data.frame'
tabit_x(x, ..., sort = 1, digits = 2, useNA = TRUE)
## S3 method for class 'grouped_df'
tabit_x(x, ..., sort = 1, digits = 2, useNA = TRUE)
## Default S3 method:
tabit_x(x, ..., sort = 1, digits = 2, useNA = "always")
|
x |
the thing to be tabulated |
... |
further optional arguments passed through to methods |
sort |
should |
digits |
the number of digits to round percentages to |
useNA |
whether ro us NAs as value category or not, defaults to TRUE |
The data.frame method will take all column value combination for cross tabulation while the grouped_df method is explicitly for tibbles with group information. For those only value combinations for the group columns are relevant.
Returns a data frame with columns
zero, one or more columns with value combinations to be cross tabulated by,
.count
(the number of times a value occurred),
.pct
(the percentage that value occurred excluding NAs) and
.pct_incl_na
(the percentage that value occurred including NAs)
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.