Last chance! 50% off unlimited learning
Sale ends in
Produces an histogram of univariate ILR data (see Filzmoser et al., 2009).
# S4 method for CompositionMatrix
hist(
x,
...,
select = 1,
breaks = "Sturges",
freq = FALSE,
labels = FALSE,
main = NULL,
sub = NULL,
ann = graphics::par("ann"),
axes = TRUE,
frame.plot = axes
)
hist()
is called for its side-effects: is results in a graphic being
displayed (invisibly return x
).
A CompositionMatrix
object.
Further graphical parameters.
A length-one vector
of column indices.
An object specifying how to compute the breakpoints
(see graphics::hist()
).
A logical
scalar: should absolute frequencies (counts) be
displayed? If FALSE
(the default), relative frequencies (probabilities)
are displayed (see graphics::hist()
).
A logical
scalar: should labels be drawn on top of bars?
If TRUE
, draw the counts or rounded densities; if labels
is a
character
vector, draw itself.
A character
string giving a main title for the plot.
A character
string giving a subtitle for the plot.
A logical
scalar: should the default annotation (title and x
and y axis labels) appear on the plot?
A logical
scalar: should axes be drawn on the plot?
A logical
scalar: should a box be drawn around the
plot?
N. Frerebeau
Filzmoser, P., Hron, K. & Reimann, C. (2009). Univariate Statistical Analysis of Environmental (Compositional) Data: Problems and Possibilities. Science of The Total Environment, 407(23): 6100-6108. tools:::Rd_expr_doi("10.1016/j.scitotenv.2009.08.008").
## Data from Aitchison 1986
data("hongite")
## Coerce to compositional data
coda <- as_composition(hongite)
## Boxplot plot
hist(coda, select = "A")
hist(coda, select = "B")
Run the code above in your browser using DataLab