order_columns: A logical scalar: should should columns be reorderd?
order_rows: An integer vector giving the index of the column to be used for the ordering of the data.
decreasing: A logical scalar: should the sort order of rows be increasing or decreasing?
names: A logical scalar: should row names be displayed?
space: A length-one numeric vector giving the the amount of space (as a fraction of the width of a bar) left between each bar (defaults to 0.2).
offset: A length-one numeric vector giving the the amount of space (as a fraction) left between groups (defaults to 0.025). Only used if groups is not NULL.
palette_color: A palette function that when called with a single argument returns a character vector of colors.
border: The color to draw the borders.
axes: A logical scalar: should axes be drawn on the plot?
legend: A logical scalar: should the legend be displayed?
Returns
barplot() is called for its side-effects: is results in a graphic being displayed (invisibly return height).
Examples
## Data from Aitchison 1986data("hongite")## Coerce to compositional datacoda <- as_composition(hongite)## Bar plotbarplot(coda)## Data from Day et al. 2011data("kommos", package ="folio")kommos <- remove_NA(kommos, margin =1)# Remove cases with missing valuescoda <- as_composition(kommos, groups =1)# Coerce to compositional data## Use ceramic types for groupingbarplot(coda, order_columns =TRUE)## Display only minor elementsminor <- coda[, is_element_minor(coda)]barplot(minor, order_columns =TRUE)
See Also
Other plot methods: as_graph(), hist(), pairs(), plot()