Re: [R] t() prior to data rotation

2011-08-20 Thread christopher stratton
Yes. I know for certain that "mydata.txt" is ordered as an nxm matrix with n objects and m variables. Being that the data is transposed prior to performing the PCA, the rotation matrix ends up being given in terms of object loadings on the principal components, rather than variables as it's normal

Re: [R] t() prior to data rotation

2011-08-20 Thread Carl Witthoft
Well, did you try it with a simple test case to see what comes out? Do you have a sample "mydata.txt" file so you know how it's ordered in the first place? Carl From: christopher stratton Date: Fri, 19 Aug 2011 23:10:07 -0400 Dear All, I have come upon an R-mode PCA protocol that uses the

[R] t() prior to data rotation

2011-08-19 Thread christopher stratton
Dear All, I have come upon an R-mode PCA protocol that uses the following arguments, where "mydata.txt" is an nxm matrix of n objects and m variables: > a <- read.table("mydata.txt") > b <- t(a) > c <- prcomp(b) > c$rotation The user then plots the coordinates given by c$rotation (PC1 and PC2) a