powered by
Performs a principal components analysis in the given data matrix. Show PCA graphical output.
pca(datos, grupos, Plot = TRUE, center = TRUE, scale = TRUE)
return an grafics.
is a matrix with the data
is a vector of classes
vector logic for grafic
data set center by columns
data set scaled by columns
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)
Run the code above in your browser using DataLab