PCA score plot
1
0
Entering edit mode
@james-anderson-1641
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070228/ b9c3e5b2/attachment.pl
• 193 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 12 hours ago
United States
James Anderson wrote: > Hi, > > I am trying to plot the score plot of the first 2 PCs. I used the > following commands for plotting: > > plot(PCA, main="PCA" ) > colors=c(rep("red",10), rep("green",10)) > text(PCA,labels =' ',col = colors ) > > However, in the text command line, if I use the above command, it > only plots those points without any colors. What I wanna plot is that > the first 10 samples plotted in blue squares, the other 10 samples > plotted in magenta dots, how to do this? Assuming PCA is a data.frame or matrix holding your data, you probably want to reverse things. colors <- rep(c("red","green"), each = 10) plot(PCA, main="PCA", pch = rep(15:16, each = 10), col = colors) HTH, Jim > > Thanks, > > James > > > > > > > > --------------------------------- > > [[alternative HTML version deleted]] > > _______________________________________________ Bioconductor mailing > list Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor Search the > archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT

Login before adding your answer.

Traffic: 919 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6