pca: Performs a principal components analysis in the given data...

View source: R/pca.r

pcaR Documentation

Performs a principal components analysis in the given data matrix. Show PCA graphical output.

Description

Performs a principal components analysis in the given data matrix. Show PCA graphical output.

Usage

pca(datos, grupos, Plot = TRUE, center = TRUE, scale = TRUE)

Arguments

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

Value

return an grafics.

Examples

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)

MultiGroupO documentation built on Sept. 11, 2024, 7:47 p.m.