margin {nexus}R Documentation

Marginal Compositions

Description

Marginal Compositions

Usage

margin(x, ...)

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

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.

Value

A CompositionMatrix object.

Author(s)

N. Frerebeau

See Also

Other statistics: aggregate(), covariance(), dist, mahalanobis(), mean(), metric_var(), quantile(), scale(), variation()

Examples

## 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)

[Package nexus version 0.2.0 Index]