# NOT RUN {
if (require(mosaicData)) {
gf_boxplot(age ~ substance, data = HELPrct)
gf_boxplot(age ~ substance, data = HELPrct, varwidth = TRUE)
gf_boxplot(age ~ substance, data = HELPrct, color = ~sex)
gf_boxplot(age ~ substance, data = HELPrct, color = ~sex, outlier.color = "gray50")
# longer whiskers
gf_boxplot(age ~ substance, data = HELPrct, color = ~sex, coef = 2)
gf_boxplot(age ~ substance, data = HELPrct, color = ~sex, position = position_dodge(width = 0.9))
}
# }
Run the code above in your browser using DataLab