Doing PCA with varimax rotation in R
<p>My code has gone south. </p>

<p>I'm importing a data 578x17 sheet from csv using the:</p>

<pre><code>Data=read.csv("Data.csv", header=TRUE, sep=',', dec='.', row.names= 1 , stringsAsFactors=TRUE)
</code></pre>

<p>My correlations and covariance matrices are the same.</p>

<p>When I try to do a PCA and a PCA with a Varimax Rotation, I get the same results:</p>

<pre><code>PCA=princomp(x = Data, cor = TRUE, scores = TRUE)
Varimax&lt;-princomp(Data, rotation="varimax")
</code></pre>

<p>When I try to do a Varimax rotation in a different way, I get:</p>

<pre><code>varimax&lt;-varimax(PCA$rotation[,1:5])
</code></pre>

<blockquote>
  <p>Error in if (nc &lt; 2) return(x) : argument is of length zero</p>
</blockquote>

<p>I'm not sure whether the problem is my code, or my .csv file, but any help would be greatly appreciated!</p>