Re: [R] plotting prcomp

2008-06-28 Thread Gavin Simpson
On Fri, 2008-06-27 at 21:43 +0200, Dan Bolser wrote: 2008/6/27 Prof Brian Ripley [EMAIL PROTECTED]: snip / I forgot to answer that: just ask R to show you stats:::biplot.prcomp Ah! I never knew the ::: trick! In this case you also need to know that biplot.prcomp is in stats. getAnywhere()

[R] plotting prcomp

2008-06-27 Thread Dan Bolser
Please consider the following PCA example; my.df - data.frame(A=(x - rnorm(100,mean=100, sd=10)), B=(y - x + rnorm(100,mean=10, sd=10))) plot(my.df) my.pc - prcomp(my.df, center=TRUE, scale=TRUE) biplot(my.pc) my.x - (my.pc$x)[,1] my.y - (my.pc$x)[,2] plot(my.x, my.y,

Re: [R] plotting prcomp

2008-06-27 Thread Prof Brian Ripley
On Fri, 27 Jun 2008, Dan Bolser wrote: Please consider the following PCA example; my.df - data.frame(A=(x - rnorm(100,mean=100, sd=10)), B=(y - x + rnorm(100,mean=10, sd=10))) plot(my.df) my.pc - prcomp(my.df, center=TRUE, scale=TRUE) biplot(my.pc) my.x - (my.pc$x)[,1] my.y -

Re: [R] plotting prcomp

2008-06-27 Thread Prof Brian Ripley
On Fri, 27 Jun 2008, Prof Brian Ripley wrote: On Fri, 27 Jun 2008, Dan Bolser wrote: Please consider the following PCA example; my.df - data.frame(A=(x - rnorm(100,mean=100, sd=10)), B=(y - x + rnorm(100,mean=10, sd=10))) plot(my.df) my.pc - prcomp(my.df, center=TRUE,

Re: [R] plotting prcomp

2008-06-27 Thread Dan Bolser
2008/6/27 Prof Brian Ripley [EMAIL PROTECTED]: On Fri, 27 Jun 2008, Prof Brian Ripley wrote: On Fri, 27 Jun 2008, Dan Bolser wrote: Please consider the following PCA example; my.df - data.frame(A=(x - rnorm(100,mean=100, sd=10)), B=(y - x + rnorm(100,mean=10, sd=10)))