plot_pca: Plot PCA

plot_pca,aquap_cube-methodR Documentation

Plot PCA

Description

Plot PCA scoresplots and / or loadings.

Usage

## S4 method for signature 'aquap_cube'
plot_pca(object, ...)

## S4 method for signature 'aquap_data'
plot_pca(object, ...)

Arguments

object

An object of class "aquap_cube" (as produced by gdmm) or of class "aqua_data" (as produced by gfd, see also getcd).

...

Optional pca plotting parameters to override the values in the analysis procedure and of the arguments listed below - for possible arguments see plot_pca_args and here below:

aps

Character length one. The default way to obtain the analysis procedure. Defaults to "def". Possible values are:

"def"

The default from the settings.r file is taken. (Argument gen_plot_anprocSource)

"cube"

Take the analysis procedure from within the cube, i.e. the analysis procedure that was used when creating the cube via gdmm is used.

"defFile"

Use the analysis procedure with the default filename as specified in the settings.r file in fn_anProcDefFile.

Custom filename

Provide any valid filename for an analysis procedure to use as input for specifying the plotting options.

ld.bandwidth

Character "def", or numeric length one. The bandwidth of wavelengths used in the peak-picking process when plotting the loadings. If left at the default "def", the value from the settings.r file (parameter pp_bandwidth) is used.

ld.adLine

Logical, numeric or character 'def'. If set to FALSE, no additional lines, if set to TRUE all the additional lines will be plotted in the loading plot. If an integer vector [2..5] is provided, one or more of the additional lines get plotted. See adLinesToVector for details. If left at the default value 'def', the value from the settings.r file (parameter pca_AdLines) is used.

ld.col

Character "def" or a valid color vector. A possible custom color for coloring the loadings in the loading plot. When left at the default "def" the value fromt the settings.r file is read in (parameter pca_ld_customColor). Provide a color-vector to use these colors for coloring the loading plot.

ld.lty

Character "def" or a positive integer vector indicating the desired line types. When left at the default "def" the value from the settings.r file is read in (parameter pca_ld_customLinetype).

Details

By providing either an object of class "aquap_cube" or of class "aqua_data" to the argument object, you can plot either the pca-modells of the complete cube, or calculate and plot the pca-modell of a single dataset. By providing one or more of the ... arguments you can override the plotting values in the selected analysis procedure, see below. The width and height of the resulting pdf can be set in the settings.

Value

A pdf or graphic device.

See Also

getcd

Other Plot functions: plot,aquap_cube,missing-method, plot,aquap_data,missing-method, plot_aqg(), plot_classifX_indepPred(), plot_da,aquap_cube-method, plot_nnet,aquap_cube-method, plot_pls,aquap_cube-method, plot_pls_indepPred(), plot_rnf,aquap_cube-method, plot_simca,aquap_cube-method, plot_svm,aquap_cube-method

Other PCA documentation: calc_pca_args, plot_pca_args

Examples

 ## Not run: 
 dataset <- gfd()
 cube <- gdmm(dataset)
 plot(cube)
 plot_pca(cube)
 plot_pca(cube, ld.bandwidth=12) # for detecting more peaks
 plot_pca(cube, ld.adLines=FALSE) # no additional lines in the loading plot 
 plot_pca(cube, ld.adLines=c(2, 4) # only vertical lines and WAMACs in the 
 # loading plot
plot_pca(cube, ld.col=c("red", "blue", "green"))
plot_pca(cube, ld.lty=c(1,2))
###
plot_pca(cube, aps="cube") # to take the analysis procedure from the cube
plot_pca(cube, aps="myAnproc.r") # take a custom analysis procedure file
###
fd <- gfd()
plot_pca(fd, pg.where="")
plot_pca(fd, pg.where="", pca.colorBy="C_Group") # assumes existence of "C_Group"

## End(Not run)

bpollner/aquap2 documentation built on March 23, 2024, 8:32 a.m.