Description Usage Arguments Value Examples
View source: R/identify_elbow.R
Identify the number of factors that explain the most amount of variance through the elbow method.
1 | identify_elbow(fi_var)
|
fi_var |
A vector representing the percentage of explained variance for each factor. Its length should equal the number of columns in the matrix of factor scores. |
A numeric value signifying the optimal number of factors to extract from the matrix of factor scores. A scree plot of the variance percentages will also be outputted.
1 2 3 4 5 6 | # Using tcga_metadata from package.
library(MetaConIdentifier)
ca_info <- run_ca(tcga_meta_clean)
# Find the optimal number of factors to extract.
num_factors <- identify_elbow(ca_info$fi_var)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.