util_plot_categorical_vars {dataquieR} | R Documentation |
Utility function to create plots for categorical variables
Description
Depending on the required level of complexity, this helper function creates various plots for categorical variables. Next to basic bar plots, it also enables group comparisons (for example for device/examiner effects) and longitudinal views.
Usage
util_plot_categorical_vars(
resp_vars,
group_vars = NULL,
time_vars = NULL,
study_data,
meta_data,
n_cat_max = 6,
n_group_max = getOption("dataquieR.max_group_var_levels_in_plot", 20),
n_data_min = 20
)
Arguments
resp_vars |
name of the categorical variable |
group_vars |
name of the grouping variable |
time_vars |
name of the time variable |
study_data |
the data frame that contains the measurements |
meta_data |
the data frame that contains metadata attributes of study data |
n_cat_max |
maximum number of categories to be displayed individually
for the categorical variable ( |
n_group_max |
maximum number of categories to be displayed individually
for the grouping variable ( |
n_data_min |
minimum number of data points to create a time course plot
for an individual category of the |
Value
a figure