Learn R Programming

nexus (version 0.3.0)

margin: Marginal Compositions

Description

Marginal Compositions

Usage

margin(x, ...)

# S4 method for CompositionMatrix margin(x, parts = c(1, 2), name = "*")

Value

A CompositionMatrix object.

Arguments

x

A CompositionMatrix object.

...

Currently not used.

parts

An integer or a character vector specifying the columns to be selected.

name

A character string giving the name of the amalgamation column.

Author

N. Frerebeau

See Also

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

Examples

Run this code
## Data from Aitchison 1986
data("hongite")

## Coerce to compositional data
coda <- as_composition(hongite)

## Marginal compositions
mar <- margin(coda, parts = c("B", "D"))
head(mar)

Run the code above in your browser using DataLab