Learn R Programming

adegraphics (version 1.0-21)

s1d.barchart: 1-D plot of a numeric score by bars

Description

This function represents a score using a chart with rectangular bars for which length is proportional to this score.

Usage

s1d.barchart(score, labels = NULL, at = 1:NROW(score), sort = FALSE,
  facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)

Value

An object of class ADEg (subclass C1.barchart) or ADEgS (if add is TRUE and/or if facets or data frame for score are used).

The result is displayed if plot is TRUE.

Arguments

score

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

labels

the labels' names drawn on the top of bars

at

a numeric vector used as an index

sort

a logical indicating if score is sorted in ascending order

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)

Author

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

Details

Graphical parameters for bars are available in ppolygons of adegpar. Some appropriated graphical parameters in p1d are also available.

See Also

C1.barchart ADEg.C1

Examples

Run this code
data(rpjdl, package = "ade4")
rpjdl.coa <- ade4::dudi.coa(rpjdl$fau, scannf = FALSE, nf = 4)
s1d.barchart(rpjdl.coa$eig, p1d.horizontal = FALSE, ppolygons.col = "grey")

Run the code above in your browser using DataLab