## 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.robmva.closed object
sind.save <- gx.robmva.closed(sind.mat2open)
## Display Mahalanobis distances
gx.md.plot(sind.save)
## Display default PCA results
gx.rqpca.screeplot(sind.save)
gx.rqpca.plot(sind.save)
## Display appropriately annotated results
gx.md.plot(sind.save,
main = "Howarth & Sinding-Larsen
Stream Sediments, Opened Data",
cex.main=0.8)
gx.rqpca.screeplot(sind.save,
main = "Howarth & Sinding-Larsen Stream Sediments
Opened Data")
gx.rqpca.plot(sind.save,
main = "Howarth & Sinding-Larsen Stream Sediments
Opened Data")
gx.rqpca.plot(sind.save, rowids = TRUE, cex = 0.8,
main = "Howarth & Sinding-Larsen Stream Sediments
Opened Data")
sind.save$pvcontrib
gx.rqpca.plot(sind.save, v1 = 3, v2 =4, rowids = TRUE, cex = 0.8,
main = "Howarth & Sinding-Larsen Stream Sediments
Opened Data")
## Display Kaiser Varimax rotated (nrot = 4) results
sind.save.rot4 <- gx.rotate(sind.save, 4)
gx.rqpca.plot(sind.save.rot4,
main = "Howarth & Sinding-Larsen Stream Sediments
Opened Data")
gx.rqpca.plot(sind.save.rot4, rowids = TRUE, cex = 0.8,
main = "Howarth & Sinding-Larsen Stream Sediments
Opened Data")
gx.rqpca.plot(sind.save.rot4, v1 = 3, v2 =4, rowids = TRUE, cex = 0.8,
main = "Howarth & Sinding-Larsen Stream Sediments
Opened Data")
## Clean-up and detach test data
rm(sind.mat)
rm(sind.mat2open)
rm(sind.save)
rm(sind.save.rot4)
detach(sind)
Run the code above in your browser using DataLab