Skip to content

Principle component analysis function

3 messages · phthao05, Jim Lemon, Paul Hiemstra

#
Dear All,
In a package, I want to use PCA function. The structure I used follow this
page: http://www.statmethods.net/advstats/factor.html.
       fit<-principle(mydata, nfactors=9, rotation=TRUE)
   or:
       result<-PCA(mydata)
    
But I don't known why R language in my computer noticed: "not found
principle", "not found PCA".
I download and installed R-2.6.2-win32.exe.
Thanks alot for answering me.
Hue University, VietNam.
#
phthao05 wrote:
Hi,
The "principal" (note the spelling - do not let your spellchecker 
convince you otherwise) function is in the "psych" package. You must 
download and install this package in order to use the function.

The PCA function is in the "FactoMineR" package. same deal. See "An 
Introduction to R" in your HTML R help if you don't know how to download 
and install packages.

Jim
#
phthao05 wrote:
Hi,

You can use the prcomp() function to perform a principal component 
analysis, it is part of the standard installation of R.

As a tip for finding the functions you need, use help.search() (e.g. 
help.seach("principal component"))

cheers,
Paul