pca_ind_contrib | R Documentation |
Return individual contributions for each principal component
pca_ind_contrib(
ind_coords,
eigs,
weighted_row = rep(1, nrow(ind_coords))/nrow(ind_coords)
)
ind_coords |
individual coordinates |
eigs |
eigs computed by |
weighted_row |
row weights |
If you want to compute the contributions of the individuals to the principal components, you have to change the weighted_col argument to rep(1, nrow(ind_cos2)).
A dataframe of individual contributions.
library(booklet)
eigs <- iris[, -5] |>
pca_standardize_norm() |>
pca_weighted_eigen()
eigs |>
pca_ind_coords() |>
pca_ind_contrib(eigs) |>
head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.