Learn R Programming

broman (version 0.72-4)

manyboxplot: Boxplot-like figure for many groups

Description

Boxplot-like figure for many groups, with lines connecting selected quantiles.

Usage

manyboxplot(
  x,
  probs = c(0.05, 0.1, 0.25),
  dotcol = "blue",
  linecol = c("black", "red", "green", "orange"),
  ...
)

Arguments

x

Matrix of data, with columns indicating the groups.

probs

Numeric vecotr of probabilities with values in [0,1). Quantiles will be symmetric, and the median will always be included.

dotcol

Color for median

linecol

Line colors, same length as probs

...

Additional graphics parameters

Value

None.

Details

Calculates quantiles of the columns of x and then plots dots or lines at median plus lines at a series of quantiles, using grayplot() for the actual plot.

See Also

grayplot()

Examples

Run this code
# NOT RUN {
mu <- c(rnorm(50, 0, 0.3), rnorm(50, 2, 0.3)) # vector of means
x <- t(matrix(rnorm(1000*100, mu), ncol=1000))
manyboxplot(x, c(0.05, 0.25), ylim=range(x),
           dotcol=c("blue","green")[(1:100 > 50) + 1],
           hlines=seq(-4, 6, by=2),
           vlines=c(1, seq(20, 100, by=20)))

# }

Run the code above in your browser using DataLab