Learn R Programming

rgr (version 1.1.7)

gx.rqpca.screeplot: Display a Scree Plot

Description

Function to display a scree plot arising from a Principal Components Analysis (PCA) from the saved object from gx.mva, gx.mva.closed,gx.robmva or gx.robmva.closed. In addition to the screeplot the cumulative variability explained is also displayed.

Usage

gx.rqpca.screeplot(save, main = "", ...)

Arguments

save
a saved object from the execution of function gx.mva, gx.mva.closed, gx.robmva or
main
an alternate plot title to that in the saved object, see Details below.
...
further arguments to be passed to methods concerning the plot. For example, if some colour other than black is required for the plotting characters, specify col = 2 to obtain red (see display.lty

Details

If main is undefined the name of the matrix object from which the PCA was derived is passed to the function via the saved object. Using the matrix name is the recommended procedure in the source functions as it helps to track the progression of the data analysis, acting as a record of the data source. However, at a presentation stage an alternate plot title may be preferred and can be defined in this function, e.g., main = "Plot Title Text". If no plot title is required set main = "".

See Also

gx.mva, gx.mva.closed, gx.robmva, gx.robmva.closed

Examples

Run this code
## Make test data available
data(sind.mat2open)

## Save PCA results and display scree plot
sind.save <- gx.mva(ilr(sind.mat2open))
gx.rqpca.screeplot(sind.save)
gx.rqpca.screeplot(sind.save,
main = "Howarth & Sinding Larsen Stream Sediments
ilr transform",
pch = 4, col = 2, cex.main = 0.9)

## Clean-up
rm(sind.save)

Run the code above in your browser using DataLab