alr(xx, j = NULL, ifclose = FALSE, ifwarn = TRUE)
j
, must be defined, there is no default index.ifclose = TRUE
.ifwarn = TRUE
which generates a reminder/warning that when carrying out a arithmetic log-ratio transformation all the data must be in the same measurement units. The message can be suppressed by setting ifwarn = FALSE
clr
) and isometric log-ratios (ilr
).
Care should be taken in selecting the variable, index = j
, for use as the divisor. Variables lacking sufficient significant figures in their quantification, or variables measured at close to their measurement detection limits, should be avoided.
It is worth noting that when the alr
transform is undertaken with a geochemically conservative element selected as the divisor and two elements are then displayed in an x-y plot the result is a Pearce Element Ratio plot (Pearce, 1968) with log scaling.clr
, ilr
, ltdl.fix.df
, remove.na
## Make test data available
data(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])
## Undertake alr transform, use Pb [j = 6 ] as the divisor,
## note necessity of converting percent Fe to mg/kg
sind.mat[, 2] <- sind.mat[, 2] * 10000
temp <- alr(sind.mat, 6)
temp
## Clean-up
rm(sind.mat)
rm(temp)
Run the code above in your browser using DataLab