## Make test data available
data(sind)
attach(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])
## Ensure all data are in the same units (mg/kg)
sind.mat2open <- sind.mat
sind.mat2open[, 2] <- sind.mat2open[, 2] * 10000
## Generate gx.mva object after an clr transform for a PCA
sind.save.clr <- gx.mva(clr(sind.mat2open))
gx.rqpca.screeplot(sind.save.clr)
gx.rqpca.plot(sind.save.clr)
## Display saved object with alternate main titles
gx.rqpca.screeplot(sind.save.clr,
main = "Howarth & Sinding-Larsen
Stream Sediments, clr Transformed Data",
cex.main = 0.8)
gx.rqpca.plot(sind.save.clr,
main = "Howarth & Sinding-Larsen
Stream Sediments, clr Transformed Data",
cex.main = 0.8)
## Generate gx.mva object after an ilr transform for Mahalanobis
## distance estimation
sind.save.ilr <- gx.mva(ilr(sind.mat2open))
gx.md.plot(sind.save.ilr)
## Display saved object with alternate main titles
gx.md.plot(sind.save.ilr,
main = "Howarth & Sinding-Larsen
Stream Sediments, ilr Transformed Data",
cex.main = 0.8)
## Clean-up and detach test data
rm(sind.mat)
rm(sind.mat2open)
rm(sind.save.clr)
rm(sind.save.ilr)
detach(sind)
Run the code above in your browser using DataLab