title: R: PCA plot with different colors for Sites
body: <p>I´m recently trying to analyse my data and want to make the graphs a little nicer but I´m failing at this. </p>
  
  <p>So I have a data set with 144 sites and 5 environmental variables. It´s basically about the substrate composition around an island and the fish abundance. On this island there is supposed to be a difference in the substrate composition between the north and the southside. Right now I am doing a pca and with the biplot function it works quite fine, but I would like to change the plot a bit.</p>
  
  <p>I need one where the sites are just points and not numbered, arrows point to the different variable and the sites are colored according to their location (north or southside). So I tried everything i could find.</p>
  
  <p>Most examples where with the dune data and suggested something like this:</p>
  
  <pre><code>library(vegan)
  library(biplot)
  data(dune)
  mod &lt;- rda(dune, scale = TRUE)
  biplot(mod, scaling = 3, type = c("text", "points"))
  </code></pre>
  
  <p>So according to this I would just need to say text and points and R would label the variables and just make points for the sites. When i do this, however I get the Error:</p>
  
  <pre><code>Error in plot.default(x, type = "n", xlim = xlim, ylim = ylim, col = col[1L],  : 
    formal argument "type" matched by multiple actual arguments
  </code></pre>
  
  <p>No idea how to get around this.</p>
  
  <p>So next strategy I found, is to make a plot manually like this:</p>
  
  <pre><code>require("vegan")
  data(dune, dune.env)
  mod &lt;- rda(dune, scale = TRUE)
  scl &lt;- 3 ## scaling == 3
  colvec &lt;- c("red2", "green4", "mediumblue")
  plot(mod, type = "n", scaling = scl)
  with(dune.env, points(mod, display = "sites", col = colvec[Use],
                        scaling = scl, pch = 21, bg = colvec[Use]))
  text(mod,display="species", scaling = scl, cex = 0.8, col = "darkcyan")
  with(dune.env, legend("bottomright", legend = levels(Use), bty = "n",
                        col = colvec, pch = 21, pt.bg = colvec))
  </code></pre>
  
  <p>This works fine so far as well, I get different colors and points, but now the arrows are missing. So I found that this should be corrected easy, if i just put <code>"display="bp"</code>" in the text line. But this doesn´t work either. Everytime I put "bp" R says:</p>
  
  <pre><code>Error in match.arg(display) : 
    argument "display" is missing, with no default
  </code></pre>
  
  <p>So I´m kind of desperate now. I looked through all the answers here and I don´t understand why <code>display="bp"</code> and <code>type=c("text","points")</code> is not working for me.</p>
  
  <p>If anyone has an idea i would be super grateful.
  <a href="https://www.dropbox.com/sh/y8xzq0bs6mus727/AADmasrXxUp6JTTHN5Gr9eufa?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/sh/y8xzq0bs6mus727/AADmasrXxUp6JTTHN5Gr9eufa?dl=0</a>
  This is the link to my dropbox folder. It contains my R-script and the csv files. The one named environmentalvariables_Kon1 also contains the data about north and southside.</p>
  
  <p>So yeah...if anyone could help me. That would be awesome. I really don´t know what to do anymore.</p>
  
  <p>Best regards,
  Nancy</p>