Description Usage Arguments Value Examples
Select principal components according to Broken Stick Model (MacArthur 1957). Adapted from function "evplot" by Francois Gillet.
1 | selectPCs(PCA.output)
|
PCA.output |
Output from geomorph::plotTangentSpace or stats::prcomp |
Returns selected PCs and variance explained, and assigns number of selected PCs to variable called "n.PCs.ARGUMENTNAME" to global environment
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.