edar_bundle_cat | R Documentation |
This function summarizes the distribution of the non-numerical variables. It bundles together all the variables that have the same categories and displays their summary in a single table.
edar_bundle_cat( data, vars = NULL, print.summary = NULL, weight = NULL, digits = 4, width.size = 150 )
data |
a data frame |
vars |
a vector with the name of the variables to display. If none is provided (vars=NULL), it summarizes all the categorical variables |
print.summary |
boolean, if |
weight |
vector with the weights |
digits |
integer, the number of digits to print |
width.size |
numeric, size of the columns in the screen to print the results |
print |
a string with the type of summary to print in the
screen (see |
It retuns a tibble in which the columns are lists. The columns
of the tibble are var.idx
, which is a list with the idx
of the variables, vars
, which is a list with the
variable names bundled together. Finally table.p
,
table.n
, and table.pn
are the tables with,
respectively, the proportions, counts, and both proportions
and counts for the bundled variables
data(edar_survey) edar_bundle_cat(edar_survey) tb = edar_bundle_cat(edar_survey ) tb tb$var.idx tb$table.n tb$table.p tb$table.pn # with pipe: # edar_survey %>% edar_bundle_cat()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.