Ah.. forget it, something must have gone wrong while i was testing (probably messed up some apply()). Seems you can just subtract the returned means - i hope at least.
Am 12.04.2012 um 14:30 schrieb Jessica Streicher: > Hi! > > I'm doing a PCA on some testdata (only 2 features) currently to see what > happens. I read a lot of times one should center ones data, so i left the > option on. > > But now i am scratching my head on how to correctly transform new data to be > comparable to the data used in the pca. > > pca$x are the points (in PC system) the function returns > origpoints%*%pca$rotation > > is not quite the same, because it is missing the centering > > for the original data i can of course do scale(origpoints,scaled=F) > beforehand, and then the results will be the same, but for new data that > option isn't available. So how would i properly transform it? > > greetings > Jessica > ______________________________________________ > R-help@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. [[alternative HTML version deleted]] ______________________________________________ R-help@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.