Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. columns <- read.csv("~/Téléchargements/cours/S9/predictive analytics/communities.var", header=FALSE, na.strings="?")
  2. columns=as.vector(t(columns))
  3. communities <- read.csv("~/Téléchargements/cours/S9/predictive analytics/communities.data", header=FALSE, na.strings="?", col.names=columns)
  4. commu_reduced <- communities[,c(4,18,34,35,38,56,97,102,118,120,121,128)]
  5. print(summary(commu_reduced))
  6. descrCor <- cor(na.omit(commu_reduced[,-1]))
  7.  
  8. summary(pc.communities <- prcomp(na.omit(commu_reduced[,-1]), scale.=TRUE))
  9. print(pc.communities)
  10. plot(pc.communities,type="l")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement