Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.22 KB | None | 0 0
  1. # your code goes here
  2.  
  3. library(lattice)
  4. wine=read.csv("~/wine.csv", header=TRUE)
  5. winepca=prcomp(wine[2:14], scale=TRUE, center=TRUE)
  6. wineplot=cbind(wine[1], winepca$x[,1:2])
  7. xyplot(PC2 ~ PC1, grid=TRUE, group=class)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement