# Data preparation
df <- head(ToothGrowth)
# Labelling: Non standard evaluation
df %>%
df_label_both(dose, supp)
# Standard evaluation
df %>%
df_label_both(dose, supp)
# Nesting the data then label each subset by groups
ToothGrowth %>%
df_nest_by(dose, supp) %>%
df_label_both(supp, dose)
Run the code above in your browser using DataLab