Displays a compositional bar chart.
Usage
# S4 method for LogRatio
autoplot(object, ..., order = FALSE, decreasing = FALSE, facet = TRUE)
# S4 method for LogRatio,missing
plot(x, order = FALSE, decreasing = FALSE, facet = TRUE, ...)
Arguments
- ...
Currently not used.
- order
A
logical
scalar: should the ratio be ordered?- decreasing
A
logical
scalar: should the sort order be increasing or decreasing?- facet
A
logical
scalar: should a matrix of panels defined by groups be drawn? Only used ifx
has groups defined.- x, object
A CompositionMatrix object.
Examples
## Coerce to compositional data
data("hongite")
coda <- as_composition(hongite)
## Bar plot
plot(coda, order = 2)
## Use ceramic types for grouping
data("kommos", package = "folio")
kommos <- remove_NA(kommos, margin = 1) # Remove cases with missing values
coda <- as_composition(kommos, groups = 1)
#> 1 qualitative variable was removed: date.
plot(coda, order = 1)
## Log ratio
clr <- transform_clr(coda)
plot(clr, facet = FALSE)