View source: R/get_eigentraits.R
get_eigentraits | R Documentation |
This function uses singular value decomposition (SVD) to calculate eigentraits from the phenotype matrix in the cape data object. It adds the eigentrait matrix to the data object along with the singular values and the right singular vectors.
get_eigentraits(data_obj, scale_pheno = TRUE, normalize_pheno = TRUE)
data_obj |
a |
scale_pheno |
A logical value indicating whether to mean-center and standardize the traits. |
normalize_pheno |
A logical value indicating whether to rankZ normalize the phenotypes. |
If scale_pheno is TRUE, the phenotypes are mean-centered and standardized before running the svd.
Because we use SVD in this step, there can be no missing values in the phenotype matrix. Any individuals with missing values are removed with a message.
Returns the data object with the eigentraits, singular values, and right singular vectors added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.