knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The goal of this package is to print data summary statistics on a boxplot. This can be done in ggplot2 or in Base R.
library(test.package)
To start, we can plot a function in base R using the box_lbls command.
x <- runif(1000, 0, 10) box_lbls(x, col = "pink")
This can also be done in ggplot for either class numeric or class 'samantha'. For class 'samantha', the ggboxplot will have notches, which indicate a confidence interval around the median.
x <- runif(1000, 0, 10) # Class numeric ggplot g.num <- ggbox_lbls(x) # Class Samantha ggplot class(x) <- "samantha" g.sam <- ggbox_lbls(x) require(gridExtra) grid.arrange(g.num, g.sam, ncol = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.