pcaPlot-methods: Principal Components Analysis for scatter plot and screeplot

Description Usage Arguments Value Examples

Description

Principal Components Analysis for scatter plot and screeplot

Usage

1

Arguments

x

a matrix object, each column is a sample, each row is a feature

cor

a logical value indicating whether the calculation should use the correlation matrix or the covariance matrix. (default: TRUE)

screeplot

a logical value indicating whether to plot the variances against the number of the principal component. (default: FALSE)

Value

The form of the value returned by pcaPlot is the summary of principal component analysis by princomp.

Examples

1
2
3
4
5
x = rnorm(100, 100, 5)
y = cbind(x, 2*x+rnorm(100), 1:100, 1:100 + rnorm(100,0.5,2))
colnames(y) = c('test1','test2','ctrl1','ctrl2')
pcaPlot(y,screeplot=TRUE)
pcaPlot(y)

ShengLi/Rutilities documentation built on May 9, 2019, 1:25 p.m.