Re: [R] PCA IN R
prcomp() in stats handles matrices with n < p well, IMO. -- Bjørn-Helge Mevik __ R-help@stat.math.ethz.ch 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.
[R] PCA IN R
hi, A very quick search of PCA in R results in a lot of packages involving that function. Just wondering which one is generally used for "fat" data like microarray, esp. when the number of features is really big? Thanks for comments -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III __ R-help@stat.math.ethz.ch 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.
RE: [R] PCA in R
When all else fails, RTFM; e.g., see ?princomp and read it in its entirety. Then maybe also try running example(princomp). Andy > From: Herman, David (NIH/NIMH) > > Hello, > I'm attempting to run a PCA on an example data > set. I ran it > just fine, but I don't know how to few the output? I listed what the > variable got stored in it, but I don't know how I can get > anything else out > of it. Are there other ways to view the results? > Also, I'm confused about the last line "6 variables and 8 > observations" > Aren't the rows the variables and the columns the observations? > > (NOTE: if anyone knows a good guide for doing a PCA on an > example data set, > from start to finish, it would be greatly appreciated) > > > m > [,1] [,2] [,3] [,4] [,5] [,6] > [1,]123456 > [2,]343781 > [3,]123456 > [4,]874143 > [5,]123456 > [6,]458213 > [7,]987678 > [8,]137350 > > pc.cr<-princomp(m,cor=TRUE) > > pc.cr > Call: > princomp(x = m, cor = TRUE) > > Standard deviations: > Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 > Comp.6 > 1.545609e+00 1.407093e+00 9.886649e-01 7.539927e-01 2.919276e-01 > 2.460515e-09 > > 6 variables and 8 observations. > > > > thanks! > Dave > > [[alternative HTML version deleted]] > > __ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] PCA in R
On 07/14/04 16:05, Herman, David (NIH/NIMH) wrote: >Hello, >I'm attempting to run a PCA on an example data set. I ran it >just fine, but I don't know how to few the output? Take a look at the help file for prcomp, especially the bottom of it. (This is completely general advice for any R function.) You will see under "See also" a number of things listed, and if you look them up or try them, then you will see several different ways of viewing the result. Under that is "Examples," which provides more hints still. And, if this isn't enough, type example(prcomp) on the command line. The biplot function is especially nice. Jon -- Jonathan Baron, Professor of Psychology, University of Pennsylvania Home page:http://www.sas.upenn.edu/~baron R search page:http://finzi.psych.upenn.edu/ __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] PCA in R
Hello, I'm attempting to run a PCA on an example data set. I ran it just fine, but I don't know how to few the output? I listed what the variable got stored in it, but I don't know how I can get anything else out of it. Are there other ways to view the results? Also, I'm confused about the last line "6 variables and 8 observations" Aren't the rows the variables and the columns the observations? (NOTE: if anyone knows a good guide for doing a PCA on an example data set, from start to finish, it would be greatly appreciated) > m [,1] [,2] [,3] [,4] [,5] [,6] [1,]123456 [2,]343781 [3,]123456 [4,]874143 [5,]123456 [6,]458213 [7,]987678 [8,]137350 > pc.cr<-princomp(m,cor=TRUE) > pc.cr Call: princomp(x = m, cor = TRUE) Standard deviations: Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 1.545609e+00 1.407093e+00 9.886649e-01 7.539927e-01 2.919276e-01 2.460515e-09 6 variables and 8 observations. > thanks! Dave [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html