title: Labels/points colored by category with PCA
body: <p>I'm using <code>prcomp</code> to do PCA analysis in R, I want to plot my PC1 vs PC2 with different color text labels for each of the two categories,
  I do the plot with:</p>
  
  <pre><code>plot(pca$x, main = "PC1 Vs PC2", xlim=c(-120,+120), ylim = c(-70,50))
  </code></pre>
  
  <p>then to draw in all the text with the different colors I've tried:</p>
  
  <pre><code>text(pca$x[,1][1:18],  pca$[,1][1:18],  labels=rownames(cava), col="green", 
       adj=c(0.3,-0.5))
  text(pca$x[,1][19:35], pca$[,1][19:35], labels=rownames(cava), col="red", 
       adj=c(0.3,-0.5))
  </code></pre>
  
  <p>But R seams to plot 2 numbers over each other instead of one, the pcs$x[,1][1:18] plots the correct points I know because if I use that plot the points it works and produces the same plot as plot(<code>pca$x</code>).</p>
  
  <p>It would be great if any could help to plot the labels for the two categories or
  even plot the points different color to make it easy to differentiate between the plots easily.</p>