title: How to use Stargazer R package with factor analysis output
body: <p>I've used stargazer in the past with regression tables.</p>
  
  <p>However I'd like to know how to use stargazer with output from factor analysis and principal component analysis. </p>
  
  <p>My code runs as follows:</p>
  
  <pre><code>fa1 &lt;- factanal(new2, factors = 4, rotation = "varimax", sort = TRUE)
  print(fa1, digits = 3, cutoff = .5, sort = TRUE)
  load &lt;- fa1$loadings[,1:2] 
  plot(load,type="n")
  text(load,labels=names(new2),cex=.7) 
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>two &lt;- pca(new2, nfactors = 3)
  </code></pre>
  
  <p>THIS doesn't work - my only attempt so far.</p>
  
  <pre><code>stargazer(fa1, type = "text", title="Descriptive statistics", digits=1, out="table1.txt")
  </code></pre>
  
  <p>UPDATE: Since posting I have been able to convert the object to a data frame with:</p>
  
  <p>converted &lt;- as.data.frame(unclass(fa1$loadings))</p>
  
  <p>I then used the code above successfully EXCEPT that the output doesn't seem to include individual factor scores.</p>
  
  <p>See below:</p>
  
  <p><a href="https://i.stack.imgur.com/bflTP.png" rel="nofollow noreferrer">loadings</a></p>