Compute the isometric log ratio transform of a (dataset of) composition(s). Default method is function ilr from package compositions.

ilr(x, V = ilrBase(x), ...)

# S3 method for default
ilr(x, V = ilrBase(x), ...)

# S3 method for hyperSpec
ilr(x, V = ilrBase(x), ...)

Arguments

x

A composition, not necessarily closed. (A numeric data frame or matrix.)

...

further parameters to ilr.

Value

Returns the transformed data matrix with one dimension less than

x. Thus for hyperSpec object the last value of

x$.wavelength is removed.

See also

ilr, ilrBase

Other row-wise transformations: alr(), apt(), clr(), cpt(), ipt()

Examples

library(spHelper)
data("Spectra2")
ilr(Spectra2)
#> Warning: Negative values in composition are used as detection limits
#> hyperSpec object
#>    150 spectra
#>    3 data columns
#>    500 data points / spectrum

plot(Spectra2)

plot(ilr(Spectra2))
#> Warning: Negative values in composition are used as detection limits