1-D box plot of a numeric score partitioned in classes (levels of a factor)
s1d.boxplot.Rd
This function represents the link between a variable and a set of qualitative variables using box-and-whisker plots.
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
isFALSE
- ...
additional graphical parameters (see
adegpar
andtrellis.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
Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray
Examples
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")