Last chance! 50% off unlimited learning
Sale ends in
gx.spearman(xx, ifclr = FALSE, ifwarn = TRUE)
ifclr = TRUE
the data are Centred Log-Ratio transformed prior to the computation of the Pearson Coefficients. The default is no transformation.ifwarn = TRUE
which generates a reminder/warning that when carrying out a centred log-ratio transformation all the data must be in the same measurement units. The message can be suppressed by setting ifwarn = FALSE
.ltdl.fix.df
, remove.na
, clr
## Make test data available
data(sind)
attach(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])
## Compute Spearman correlation coefficients
gx.pearson(sind.mat)
## Compute Spearmann correlation coefficients following
## a centred log ratio transformation, note necessity
## of converting percent Fe to mg/kg
sind.mat[, 2] <- sind.mat[, 2] * 10000
gx.pearson(sind.mat, ifclr = TRUE)
## Clean-up and detach test data
rm(sind.mat)
detach(sind)
Run the code above in your browser using DataLab