Re: [R] Accessing the (first or more) principal component with princomp or prcomp

2012-08-23 Thread Jean V Adams
As Bert suggests, the help file explains the differences between princomp and prcomp. Look under the Details section ?princomp ?prcomp # the first PC using princomp a - princomp(USArrests, cor=TRUE) a1 - a$scores[, 1] # the first PC using prcomp # use center=TRUE and scale.=TRUE for the

[R] Accessing the (first or more) principal component with princomp or prcomp

2012-08-22 Thread jpm miao
Hi , To my knowledge, there're two functions that can do principal component analysis, princomp and prcomp. I don't really know the difference; the only thing I know is that when the sample size number of variable, only prcomp will work. Could someone tell me the difference or where I can

Re: [R] Accessing the (first or more) principal component with princomp or prcomp

2012-08-22 Thread Bert Gunter
How about reading the Help files? -- Bert On Wed, Aug 22, 2012 at 8:34 PM, jpm miao miao...@gmail.com wrote: Hi , To my knowledge, there're two functions that can do principal component analysis, princomp and prcomp. I don't really know the difference; the only thing I know is that