One way is to give the names you want to use as the rownames of the scores 
component of the principal component analysis object.  e.g.

pca <- princomp(~.-Species, iris)
rownames(pca$scores) <- paste("C", substring(1001:1150, 2), sep = "")
biplot(pca) 

(May I also suggest you treat the group with a little more courtesy in the way 
you phrase your questions in future and get your shift key fixed?  It would 
also be nice to know your real name.)


Bill Venables
http://www.cmis.csiro.au/bill.venables/ 


-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of rat.cage
Sent: Monday, 4 May 2009 10:43 AM
To: r-help@r-project.org
Subject: [R] how to display case names in biplot.prcomp?

hey,

im trying hard to display names (given in a seperate variable) instead
of "case numbers" in a pca plot (by biplot of a prcomp output). somebody
could help me with this?

lukas

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to