mean function

Compositional Mean

methods

Compositional Mean

## S4 method for signature 'CompositionMatrix' mean(x, ..., ignore_na = FALSE, ignore_zero = TRUE)

Arguments

  • x: A CompositionMatrix object.
  • ...: Currently not used.
  • ignore_na: A logical scalar: should missing values be stripped before the computation proceeds?
  • ignore_zero: A logical scalar: should zeros be stripped before the computation proceeds?

Returns

A numeric vector.

Details

Closed vector of the columns geometric means.

Examples

## Data from Aitchison 1986 data("hongite") ## Coerce to compositional data coda <- as_composition(hongite) ## Mean mean(coda) ## Quantile quantile(coda)

References

Aitchison, J. (1986). The Statistical Analysis of Compositional Data. London: Chapman and Hall, p. 64-91.

See Also

Other statistics: aggregate(), condense(), covariance(), dist, mahalanobis(), margin(), pip(), quantile(), scale(), variance(), variance_total(), variation()

Author(s)

N. Frerebeau