Re: [R] Plot Principal component analysis

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Thu, 28 Feb 2008 15:21:43 +0000 (UTC)

SNN <s.nancy1_at_yahoo.com> wrote in news:15717669.post_at_talk.nabble.com:

>
> Thanks for your help,
> Can R plot the data in 3 dimention, with different colors for each
> group ?
> for exmple I would like to have the plot with respect to PC1, PC2
> and PC3.
>

See if these answer your desires:

<http://www.jstatsoft.org/v08/i11/paper> <http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=44>

-- 
David Winsemius


> SNN wrote:
>>
>> Hi,
>>
>> I have matrix of 300,000*115 (snps*individual). I ran the PCA on
>> the covariance matrix which has a dimention oof 115*115. I have the
>> first 100 individuals from group A and the rest of 15 individuals
>> from group B. I need to plot the data in two and 3 dimentions with
>> respect to PC1 and PC2 and (in 3D with respect to PC1, PC2 and
>> PC3). I do not know how to have the plot ploting the first 100
>> points corresponding to group A in red (for example) and the rest
>> of the 15 points in Blue? i.e I want the each group in a diffrent
>> color in the same plot. I appreciate if someone can help.
>>
>> Thanks,
>>
>
______________________________________________ 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 Thu 28 Feb 2008 - 15:31:02 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 28 Feb 2008 - 16:30:17 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