Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. df <- read.csv("diffs.csv")
  2. df2 <- df[,-1]
  3. rownames(df2) <- df$family
  4. df2$X3pl[9] <- mean(df$X3pl, na.rm = TRUE)
  5. PCA <- prcomp(df2, scale. = TRUE)
  6. library(ggfortify)
  7. autoplot(PCA,
  8. shape = FALSE,
  9. loadings = TRUE,
  10. label = TRUE,
  11. loadings.label = TRUE)+
  12. theme_bw()+
  13. coord_fixed()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement