Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gsimargin

Internal function: Compute a desired compositional margin


Description

This generic function should select the selected type of margin based on the class of the dataset and the specified margin type.

Usage

gsi.margin(X,...)
## S3 method for class 'acomp'
gsi.margin(X,what,...,margin="acomp")
## S3 method for class 'rcomp'
gsi.margin(X,what,...,margin="rcomp")
## S3 method for class 'aplus'
gsi.margin(X,what,...)
## S3 method for class 'rplus'
gsi.margin(X,what,...)

Arguments

X

The dataset to take the margin from.

what

The indices xor column names to be kept.

margin

The type of marginalisation to be used. Possible values are: '"sub"', '"rcomp"', '"acomp"' and an index xor a name of a variable in the dataset.

...

other arguments

Value

A marginalized dataset (or vector) still containing the variables given by what and optionally one additional part named '"+"', '"*"' or margin.

Note

Do not use gsi.* functions directly since they are internal functions of the package

Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de, Raimon Tolosana-Delgado

See Also

Examples

#data(SimulatedAmounts)
#plot(gsi.margin(acomp(sa.lognormals5),c("Cd","Cu")))

compositions

Compositional Data Analysis

v2.0-1
GPL (>= 2)
Authors
K. Gerald van den Boogaart <boogaart@hzdr.de>, Raimon Tolosana-Delgado, Matevz Bren
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.