barplot: Bar charts of amounts

barplot.acompR Documentation

Bar charts of amounts

Description

Compositions and amounts dispalyed as bar plots.

Usage

## S3 method for class 'acomp'
barplot(height,...,legend.text=TRUE,beside=FALSE,total=1,
plotMissings=TRUE,missingColor="red",missingPortion=0.01)
## S3 method for class 'rcomp'
barplot(height,...,legend.text=TRUE,beside=FALSE,total=1,
plotMissings=TRUE,missingColor="red",missingPortion=0.01)
## S3 method for class 'aplus'
barplot(height,...,legend.text=TRUE,beside=TRUE,total=NULL,
plotMissings=TRUE,missingColor="red",missingPortion=0.01)
## S3 method for class 'rplus'
barplot(height,...,legend.text=TRUE,beside=TRUE,total=NULL,
plotMissings=TRUE,missingColor="red",missingPortion=0.01)
## S3 method for class 'ccomp'
barplot(height,...,legend.text=TRUE,beside=FALSE,total=1,
plotMissings=TRUE,missingColor="red",missingPortion=0.01)
          

Arguments

height

an acomp, rcomp, aplus, or rplus object giving amounts to be displayed

...

further graphical parameters as in barplot

legend.text

same as legend.text in barplot

beside

same as beside in barplot

total

The total to be used in displaying the composition, typically 1, 100 or the number of parts. If NULL no normalisation takes place.

plotMissings

logical: shall missings be annotate in the plot

missingColor

color to draw missings

missingPortion

The space portion to be reserved for missings

Details

These functions are essentially light-weighted wrappers for barplot, just adding an adequate default behavior for each of the scales. The missingplot functionality will work well with the default settings.

If plotMissings is true, there will be an additional portion introduced, which is not counted in the total. This might make the plots looking less nice, however they make clear to the viewer that it is by no means clear how the rest of the plot should be interpreted and that the missing value really casts some unsureness on the rest of the data.

Value

A numeric vector (or matrix, when beside = TRUE) giving the coordinates of all the bar midpoints drawn, as in barplot

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

See Also

acomp, rcomp, rplus aplus, plot.acomp, boxplot.acomp

Examples

data(SimulatedAmounts)
barplot(mean(acomp(sa.lognormals[1:10,])))
barplot(mean(rcomp(sa.lognormals[1:10,])))
barplot(mean(aplus(sa.lognormals[1:10,])))
barplot(mean(rplus(sa.lognormals[1:10,])))

barplot(acomp(sa.lognormals[1:10,]))
barplot(rcomp(sa.lognormals[1:10,]))
barplot(aplus(sa.lognormals[1:10,]))
barplot(rplus(sa.lognormals[1:10,]))

barplot(acomp(sa.tnormals))

compositions documentation built on June 22, 2024, 12:15 p.m.