selectPCs: selectPCs

Description Usage Arguments Value Examples

Description

Select principal components according to Broken Stick Model (MacArthur 1957). Adapted from function "evplot" by Francois Gillet.

Usage

1
selectPCs(PCA.output)

Arguments

PCA.output

Output from geomorph::plotTangentSpace or stats::prcomp

Value

Returns selected PCs and variance explained, and assigns number of selected PCs to variable called "n.PCs.ARGUMENTNAME" to global environment

Examples

1
2
3
4
5
6
7
8
9
my_data<- tibble::tibble(
x=c(rnorm(100,1,1), rnorm(100, 1, 0.5), rnorm(100, 4, 1), rnorm(100, 1, 1.5)),
y=c(rnorm(100,2,1), rnorm(100, 3, 0.5), rnorm(100, 2, 1), rnorm(100, 2, 1.5)),
z=c(rnorm(100,1,1.5), rnorm(100, 5, 1), rnorm(100, 1, .5), rnorm(100, 2.5, 2)),
)

PCA.out<-prcomp(my_data)

selectPCs(PCA.out)

iholzleitner/frlgmm3D documentation built on May 21, 2019, 1:44 p.m.