I am using the psych
package's fa
command for factor analysis, and so have an object of class fa
. I can query the loadings with fac$loadings
, but I want to only extract the table containing the loadings, so I can use xtable
(or similar) to convert it into LaTeX format.
Example code:
library(psych)
library(xtable)
data(bfi)
fac <- fa(r=cor(bfi, use="complete.obs"), nfactors=5, fm="ml", rotate="none")
fac$loadings
ld <- someMagicalFunction(fac$loadings)
xtable(ld)
Can anyone tell me what I can use for someMagicalFunction
?