-----Original Message-----
From: ashz at walla.co.il
Sent: Wed, 10 Jul 2013 12:49:55 -0700 (PDT)
To: r-help at r-project.org
Subject: Re: [R] PCA and gglot2
Dear John,
Thanks for the help.
I did some minor modifications to your script as I had some problems:
...
pca = PCA(data[,1:4], scale.unit=T, graph=F)
dat1 <- data.frame(pca$scores) # creates the data.frame
dat1$items <- rownames(data$group) # adds item names
ggplot(dat1, aes(pca$ind$coord[,1], pca$ind$coord[,2], colour =
dat1$item))
+ geom_point() + theme(legend.position="none")
I still do not get separation by color by group (column 5 of csv file) as
the dat1 is empty (data frame with 0 columns and 0 rows).
Any reason why?
Thanks again.
--
View this message in context:
http://r.789695.n4.nabble.com/PCA-and-gglot2-tp4671225p4671253.html
Sent from the R help mailing list archive at Nabble.com.