homlr
homlr copied to clipboard
Principal Component Analysis code error
The following code:isn't running-
How many PCs required to explain at least 75% of total variability
min(which(ve$CVE >= 0.75))
[1] 27
Might be an issue with variable 've' because there is none
Good catch @vishnugunneri , there is a hidden code chunk that computes ve
via:
ve <- data.frame(
PC = my_pca@model$importance %>% names(),
PVE = my_pca@model$importance %>% .[2,] %>% unlist(),
CVE = my_pca@model$importance %>% .[3,] %>% unlist()
)