# rcompmargin: Marginal compositions in real geometry

Description Usage Arguments Details Value Missing Policy Author(s) References See Also Examples

### Description

Compute marginal compositions by amalgamating the rest (additively).

### Usage

 ```1 2``` ``` rcompmargin(X,d=c(1,2),name="+",pos=length(d)+1,what="data") ```

### Arguments

 `X` composition or dataset of compositions `d` vector containing the indices xor names of the columns to be kept `name` The new name of the amalgamation column `pos` The position where the new amalgamation column should be stored. This defaults to the last column. `what` The role of X either `"data"` for data (or means) to be transformed or `"var"` for variances to be transformed.

### Details

The amalgamation column is simply computed by adding the non-selected components after closing the composition. This is consistent with the `rcomp` approach and is widely used because of its easy interpretation. However, it often leads to difficult-to-read ternary diagrams and is inconsistent with the `acomp` approach.

With the argument `what="var"` the function transformes an rcomp variance to the resulting variance of the resulting composition.

### Value

A closed compositions with class `"rcomp"` containing the selected variables given by `d` and the the amalgamation column.

### Missing Policy

MNAR has the highest priority, MAR next and WZERO (BDL,SZ),- values are considered as 0 and reported as BDL in the End.

### Author(s)

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

### References

References missing

`acompmargin`, `rcomp`

### Examples

 ```1 2 3 4``` ```data(SimulatedAmounts) plot.rcomp(sa.tnormals5,margin="rcomp") plot.rcomp(rcompmargin(sa.tnormals5,c("Cd","Zn"))) plot.rcomp(rcompmargin(sa.tnormals5,c(1,2))) ```

Search within the compositions package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.