addLR | R Documentation |

The additive logratio coordinates map D-part compositional data from the simplex into a (D-1)-dimensional real space.

```
addLR(x, ivar = ncol(x), base = exp(1))
```

`x` |
D-part compositional data |

`ivar` |
Rationing part |

`base` |
a positive or complex number:
the base with respect to which logarithms are computed. Defaults to |

The compositional parts are divided by the rationing part before the logarithm is taken.

A list of class “alr” which includes the following content:

`x.alr` |
the resulting coordinates |

`varx` |
the rationing variable |

`ivar` |
the index of the rationing variable, indicating the column
number of the rationing variable in the data matrix |

`cnames` |
the column names of |

The additional information such
as *cnames* or *ivar* is useful when an inverse mapping is
applied on the ‘same’ data set.

Matthias Templ

Aitchison, J. (1986) *The Statistical Analysis of
Compositional Data* Monographs on Statistics and Applied Probability.
Chapman and Hall Ltd., London (UK). 416p.

`addLRinv`

, `pivotCoord`

```
data(arcticLake)
x <- arcticLake
x.alr <- addLR(x, 2)
y <- addLRinv(x.alr)
## This exactly fulfills:
addLRinv(addLR(x, 3))
data(expenditures)
x <- expenditures
y <- addLRinv(addLR(x, 5))
head(x)
head(y)
## --> absolute values are preserved as well.
## preserve only the ratios:
addLRinv(x.alr, ivar=2, useClassInfo=FALSE)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.