#' Get PCA Data
#'
#' @param data Data structure from geomorph or created by readTem()
#' @return A table summarizing the percent variation explained by each PC and the set of PC scores
#' @examples
#' faces$pca <- getPCA(faces)
#' @export
getPCA <- function(data) {
message("Running PCA");
coords <- getCoords(data)
pca <- prcomp(geomorph::two.d.array(coords), center = TRUE, scale. = FALSE)
return(pca)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.