pca | R Documentation |
Performs a principal components analysis in the given data matrix. Show PCA graphical output.
pca(datos, grupos, Plot = TRUE, center = TRUE, scale = TRUE)
datos |
is a matrix with the data |
grupos |
is a vector of classes |
Plot |
vector logic for grafic |
center |
data set center by columns |
scale |
data set scaled by columns |
return an grafics.
library(plsgenomics)
data(SRBCT)
mydata<-SRBCT$X
mydata<-mydata[1:30,1:20]
groups<-as.factor(SRBCT$Y)[1:30]
pca(datos=mydata,grupos=groups,Plot=TRUE,center=TRUE,scale=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.