# NOT RUN {
library(parameters)
principal_components(mtcars[, 1:7], n = "all", threshold = 0.2)
principal_components(mtcars[, 1:7], n = 2, rotation = "oblimin", threshold = "max", sort = TRUE)
principal_components(mtcars[, 1:7], n = 2, threshold = 2, sort = TRUE)
pca <- principal_components(mtcars[, 1:5], n = 2)
summary(pca)
predict(pca)
# }
# NOT RUN {
# Automated number of components
principal_components(mtcars[, 1:4], n = "auto")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab