The boxplot with sample size information is one of the features
included in the HH package.
An example is posted on my site
http://astro.ocis.temple.edu/~rmh/HH/bwplot-color.pdf
In this example I show grouping, control of x-axis position, multiple
x-axis labels, and
control of display of extreme o
Depends on exactly how / where you want to display the text.
One approach (showing text inside each panel, at the bottom):
bwplot(val ~ grp | panvar, data = dat,
panel = function(x, y, ...) {
panel.bwplot(x, y, ...)
nn <- table(x)
panel.text(paste("n =", nn), x = seq_along(nn),
Dear R-users,
I am using R version 2.9.1 and lattice 0.17-26 under windows.
In a lattice boxplot, I would like to add information on how many observations
each singel boxplot is based upon.
For example (the basic plot):
# Begin R-code
library(lattice)
dat <- data.frame(panvar = rep(c("A","B","A"
3 matches
Mail list logo