1-D box plot of a numeric score partitioned in classes (levels of a factor)

Share:

Description

This function represents the link between a variable and a set of qualitative variables using box-and-whisker plots.

Usage

1
2
s1d.boxplot(score, fac = gl(1, NROW(score)), at = 1:nlevels(fac), col = NULL, 
  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)

Arguments

score

a numeric vector (or a data frame) used to produce the plot

fac

a factor (or a matrix of factors) to split score

at

a numeric vector used as an index

col

a color or a colors vector for points, labels, lines and polygons according to their factor level. Colors are recycled whether there are not one color by factor level.

facets

a factor splitting score so that subsets of the data are represented on different sub-graphics

plot

a logical indicating if the graphics is displayed

storeData

a logical indicating if the data are stored in the returned object. If FALSE, only the names of the data arguments are stored

add

a logical. If TRUE, the graphic is superposed to the graphics already plotted in the current device

pos

an integer indicating the position of the environment where the data are stored, relative to the environment where the function is called. Useful only if storeData is FALSE

...

additional graphical parameters (see adegpar and trellis.par.get)

Details

Graphical parameters for rugs are available in plines of adegpar and the ones for boxes in ppolygons. Some appropriated graphical parameters in p1d are also available.

Value

An object of class ADEg (subclass S1.boxplot) or ADEgS (if add is TRUE and/or if facets or data frame for score or data frame for fac are used).
The result is displayed if plot is TRUE.

Author(s)

Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray

See Also

S1.boxplot ADEg.S1

Examples

1
2
3
4
5
data(banque, package = "ade4")
banque.acm <- ade4::dudi.acm(banque, scan = FALSE, nf = 4)
s1d.boxplot(banque.acm$l1[, 1], banque[, 2], psub.text = names(banque)[2], 
  psub.position = "topleft", col = c("red", "blue", "green", "purple", "orange"))
s1d.boxplot(banque.acm$l1[,1], banque[, 1:6], psub.position = "topleft")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.