Learn R Programming

compositions (version 0.9-11)

barplot.acomp: Barcharts of amounts

Description

Compositions and amounts dispalyed by barplots.

Usage

## S3 method for class 'acomp':
barplot(height,...,legend.text=TRUE,beside=FALSE,total=1)
## S3 method for class 'rcomp':
barplot(height,...,legend.text=TRUE,beside=FALSE,total=1)
## S3 method for class 'aplus':
barplot(height,...,legend.text=TRUE,beside=TRUE)
## S3 method for class 'rplus':
barplot(height,...,legend.text=TRUE,beside=TRUE)

Arguments

height
an acomp, rcomp, aplus, or rplus object giving amounts to be displayed by a barplot
...
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

Value

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

Details

The functions are essentially light weighted warpers for barplot just adding a adequate default behavior for each of the scales.

See Also

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

Examples

Run this code
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,]))

Run the code above in your browser using DataLab