plotScore_ellipse: Plot PCA scores with ellipse

Description Usage Examples

Description

Plot PCA scores with ellipse using dataEllipse

Usage

1
2
plotScore_ellipse(PCA, x = 1, y = 2, level = 0.95, xlim = NULL,
  ylim = NULL, labels = NULL, ...)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
require(EEM)
data(applejuice)
applejuice_uf <- unfold(applejuice)
PCA <- prcomp(applejuice_uf)
plotScore_ellipse(PCA)

# change level
plotScore_ellipse(PCA, level = 0.8) 

# manually set x,y ranges
plotScore_ellipse(PCA, xlim = c(-9000, 9000), ylim = c(-4000, 4000)) 

# fill in circles
plotScore_ellipse(PCA, fill = TRUE, 
fill.alpha = 0.2, xlim = c(-9000, 9000), ylim = c(-4000, 4000))

# add labeling
plotScore_ellipse(PCA, labels = names(applejuice))

chengvt/cheng documentation built on May 13, 2019, 3:52 p.m.