Session Ready
Exercise

Visualizing results with a scree plot

Previously, you used the PCA results poke_pca to add the following columns to prop_var: pca_comp, which enumerates each column in the table, pcVar, which contains the variance for each principal component, and propVar_ex, which contains the proportion of the variance explained by each component.

prop_var <- prop_var %>%
  mutate(pca_comp = 1:n(),
           pcVar = sdev^2, 
         propVar_ex = pcVar/sum(pcVar))

Using these results, let's create a plot to better visualize what is explained by each component.

Instructions
100 XP
  • Create a scree plot of the proportion of variance explained by each component.