Produces an histogram of univariate ILR data (see Filzmoser et al., 2009).
Usage
# S4 method for class 'CompositionMatrix'
hist(
x,
...,
select = 1,
breaks = "Sturges",
freq = FALSE,
labels = FALSE,
main = NULL,
sub = NULL,
ann = graphics::par("ann"),
axes = TRUE,
frame.plot = axes
)Arguments
- x
A
CompositionMatrixobject.- ...
Further graphical parameters.
- select
A length-one
vectorof column indices.- breaks
An object specifying how to compute the breakpoints (see
graphics::hist()).- freq
A
logicalscalar: should absolute frequencies (counts) be displayed? IfFALSE(the default), relative frequencies (probabilities) are displayed (seegraphics::hist()).- labels
A
logicalscalar: should labels be drawn on top of bars? IfTRUE, draw the counts or rounded densities; iflabelsis acharactervector, draw itself.- main
A
characterstring giving a main title for the plot.- sub
A
characterstring giving a subtitle for the plot.- ann
A
logicalscalar: should the default annotation (title and x and y axis labels) appear on the plot?- axes
A
logicalscalar: should axes be drawn on the plot?- frame.plot
A
logicalscalar: should a box be drawn around the plot?
Value
hist() is called for its side-effects: is results in a graphic being
displayed (invisibly return x).
References
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. doi:10.1016/j.scitotenv.2009.08.008 .
Examples
## Data from Aitchison 1986
data("hongite")
## Coerce to compositional data
coda <- as_composition(hongite)
## Boxplot plot
hist(coda, select = "A")
hist(coda, select = "B")
