Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df <- read.csv("diffs.csv")
- df2 <- df[,-1]
- rownames(df2) <- df$family
- df2$X3pl[9] <- mean(df$X3pl, na.rm = TRUE)
- PCA <- prcomp(df2, scale. = TRUE)
- library(ggfortify)
- autoplot(PCA,
- shape = FALSE,
- loadings = TRUE,
- label = TRUE,
- loadings.label = TRUE)+
- theme_bw()+
- coord_fixed()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement