r – How to visualize PCA variable loadings as barplot?

I am currently using R Studio and tackling a task that’d require me to create a visual that allows me to examine the loadings from PC1 and PC2 from a PCA and identify which loadings (disregarding the sign) are greater than 0.3.

I am aware that this information is readily and simply available by looking at the console output for:

round(pca$rotation, 3)

Where I am rounding to 3 d.p. the Loadings/coefficients for the PCs found in a PCA called “pca”

However, for the sake of my task, I’d like to be able to reinforce these numbers with a simple visual like a barplot or something that’s doable using tidyverse packages.

Read more here: Source link