0

I have a question concerning the rarefaction method in the specaccumfucntion in R.

I have the following dataset

Species1  Species2 Species3 ... Species75
10        20       5        ... 7

And I am trying to plot a curve with on the x-axis the amount of individuals and on the y-axis the amount of species (in the example above this should lead to 75).

I am trying to plot this as follows:

plot(specaccum(dataset, method="rarefaction", xvar="individuals"))

But I get nothing. Can someone help me?

Thank you very much

Victor D.

Victor
  • 41
  • 1
  • 1
  • 7

1 Answers1

0

I had the same problem, try creating an object I used chao1 method, put what you prefer, and after plot separately

sac <- specaccum(dataset,method ="rarefaction", gamma = "chao1")

plot(sac, add = FALSE, random = FALSE, ci = 2, ci.type = c("polygon"), col = par("fg"), xvar = c( "individuals"))

See http://127.0.0.1:12380/library/vegan/html/specaccum.html to be sure

  • Hey I get a plot but there is nothing on it, I think there is a problem with the xvar=c("individuals"), I used the term 'individuals' to indicate that the plot should be based on the values in my example above. How do u make that R uses these values to construct the x-axis, because there is not really a column that is named 'individuals'? Thanks Victor – Victor Apr 14 '15 at 18:08