
Last chance! 50% off unlimited learning
Sale ends in
This funcntion uses boxplot
to produce a boxplot which is then
annotated with the number of observations in each group.
boxplot2(..., top=FALSE, shrink=1, textcolor=NULL)
parameters passed to boxplot
.
logical indicating whether the number of observations
should be added to the top or the bottom of the plotting
region. Defaults to FALSE
.
value to shrink character size (cex) when annotating.
text color.
Gregory R. Warnes greg@warnes.net
data(state)
# n's at bottom
boxplot2( state.area ~ state.region)
# n's at top
boxplot2( state.area ~ state.region, top=TRUE)
# small red text
boxplot2( state.area ~ state.region, shrink=0.8, textcolor="red")
Run the code above in your browser using DataLab