Description Usage Arguments Details Value Examples
Draws scores and Loadings plots for PCA analysis derived from the SVDforPCA function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | DrawSL(
obj,
type.obj = c("PCA", "PLSDA", "OPLSDA"),
drawNames = TRUE,
createWindow = FALSE,
main = NULL,
class = NULL,
axes = c(1, 2),
type.graph = c("scores", "loadings"),
loadingstype = c("l", "p", "s"),
num.stacked = 4,
xlab = NULL,
ylab = NULL,
ang = 0,
xaxis = c("numerical", "character"),
nxaxis = 10
)
|
obj |
The objects resulting from a PCA analysis with the SVDforPCA function. |
type.obj |
The type of object to be plotted. |
drawNames |
If |
createWindow |
If |
main |
Plot title. If |
class |
Optional character or numeric vector giving the class of the observations. |
axes |
Numerical vector indicating the PC axes that are drawn. Only the two first values are considered for scores plot. See details |
type.graph |
The type of plot, either |
loadingstype |
The type of Loadings plot, either a line plot ( |
num.stacked |
Number of stacked plots if |
xlab |
Label for the x-axis. |
ylab |
Label for the y-axis. |
ang |
Angle to rotate the x axis labels for a better visualisation. |
xaxis |
Specify if the xaxis is numerical or character |
nxaxis |
Number of thick marks on the xaxis for a character x variable |
If type.obj
is 'OPLSDA'
, axes = 1 represents the predictive score vector, axes = 2 represents the first orthogonal score vector, etc.
A score or loading plot in the current device.
1 2 3 4 5 6 7 8 9 10 11 | data('HumanSerum')
res.PCA = SVDforPCA(HumanSerumSpectra)
class = ClassHS
DrawSL(res.PCA, drawNames=TRUE, type.obj = 'PCA',
createWindow=FALSE, main = 'PCA score plot for HumanSerum dataset',
class = class, axes =c(1,2), type.graph ='scores')
DrawSL(res.PCA, drawNames=TRUE, type.obj = 'PCA',
createWindow=FALSE, main = 'PCA loadings plot for HumanSerum dataset',
axes = 1, type.graph ='loadings', loadingstype='l')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.