Description Usage Arguments Value Examples
This is a wrapper for a ggplot2 boxplot for a variable with different groups, and also adds the labels for outliers, if any.
1 | boxplot_by_categories(df, quantitative, categorical, id = NULL)
|
df |
A data frame. |
quantitative |
The quoted name of the column with the quantitative variable. |
categorical |
The quoted name of the column with the categorical variable, i.e. the variables that divides the data in groups. |
id |
The quoted name name of the column with the individual variables, i.e. the observations. It is set as default to NULL for the cases where there is no column identifying the indioviduals in the data set. |
Boxplot of the quantitative variable for each group in the categorical variable. And also idintify the outlier, when they exist is the data.
1 | boxplot_by_categories(df=data, quantitative="pressure", categorical="blood_type",id="patient_name")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.