plot.pcal1: Plot a Pcal1 Object

Description Usage Arguments Details See Also Examples

View source: R/plot.pcal1.R

Description

Plots the scores on the first two principal components.

Usage

1
2
## S3 method for class 'pcal1'
plot(x, ...)

Arguments

x

an object of class pcal1 with scores for at least the first two dimensions

...

arguments to be passed to or from other methods.

Details

This function is a method for the generic function plot, for objects of class pcal1.

See Also

pcal1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##for a 100x10 data matrix X, 
## lying (mostly) in the subspace defined by the first 2 unit vectors, 
## projects data into 1 dimension.
X <- matrix(c(runif(100*2, -10, 10), rep(0,100*8)),nrow=100) 
               + matrix(c(rep(0,100*2),rnorm(100*8,0,0.1)),ncol=10)
mypcal1 <- pcal1(X)

##projects data into 2 dimensions.
mypcal1 <- pcal1(X, projDim=2, center=FALSE, projections="l1")

## plot first two scores
plot(mypcal1$scores)

pcaL1 documentation built on Jan. 4, 2022, 1:12 a.m.