[R] PCA analysis

From: Monna Nygård <monnire_at_hotmail.com>
Date: Tue, 17 Jun 2008 12:04:23 +0300

Hi,  

I have a problem with making PCA plots that are readable. I would like to set different sympols instead of the numbers of my samples or their names, that I get plotted (xlabs). How is this possible? With points, i don´t seem to get the right data plotted onto the PCA plot, as I do not quite understand from where it is taken. I dont know how to plot the correct columns of the prcomp outcome (p). I would really appreciate if someone could help me, I have struggled with this for days now. How can I make a function that gives different symbols for the points, depending on how big the number given to it as xlabs is?  

Making the plots.  

read.table(file = "S:\\SEDIM\\TRFLP\\B90-700.txt",sep="\t", header=T)->boutbout <-bout[-1]p <- prcomp(bout) biplot(p, choices = c(2,3), scale = 1, pc.biplot = FALSE, var.axes = F, ylabs = NULL, xlabs=c("119","175","135","330","51","422","67","409","470","70","67","89","135","215","330","409","470","51","80","119","175","222","301","422","280","171","256","243","404","37","157","28","187","70","42","283","261","85","147","204","235","411","514","77","204","87","366","306","351","371","38","534","199","407","42","167","480","195","22","35","80","433","43","109","214","363","292","61","115","178","273","521","72","126","253","288","501","83","113","250","359","498","19","130","389","324","24","58","124","388","319","164","101","153","383","345","219","179","161","375","298","450","555","439","54","54","490","465","411","18","85","503","455","394","179","187","416","447","219","461","164","366","474","167","236","507","319","509","467","507","450","359","507","192","453","101","456","512","517"), cex=0.67, main="90-700bp")  



[[elided Hotmail spam]]

PLink

        [[alternative HTML version deleted]]



R-help_at_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. Received on Tue 17 Jun 2008 - 09:44:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 19 Jun 2008 - 22:30:53 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive