Find where species accumulation curve reaches asymptote
<p>I have used the <code>specaccum()</code> command to develop species accumulation curves for my samples.</p>

<p>Here is some example data:</p>

<pre><code>site1&lt;-c(0,8,9,7,0,0,0,8,0,7,8,0)
site2&lt;-c(5,0,9,0,5,0,0,0,0,0,0,0)
site3&lt;-c(5,0,9,0,0,0,0,0,0,6,0,0)
site4&lt;-c(5,0,9,0,0,0,0,0,0,0,0,0)
site5&lt;-c(5,0,9,0,0,6,6,0,0,0,0,0)
site6&lt;-c(5,0,9,0,0,0,6,6,0,0,0,0)
site7&lt;-c(5,0,9,0,0,0,0,0,7,0,0,3)
site8&lt;-c(5,0,9,0,0,0,0,0,0,0,1,0)
site9&lt;-c(5,0,9,0,0,0,0,0,0,0,1,0)
site10&lt;-c(5,0,9,0,0,0,0,0,0,0,1,6)
site11&lt;-c(5,0,9,0,0,0,5,0,0,0,0,0)
site12&lt;-c(5,0,9,0,0,0,0,0,0,0,0,0)
site13&lt;-c(5,1,9,0,0,0,0,0,0,0,0,0)

species_counts&lt;-rbind(site1,site2,site3,site4,site5,site6,site7,site8,site9,site10,site11,site12,site13)

accum &lt;- specaccum(species_counts, method="random", permutations=100)

plot(accum)
</code></pre>

<p>In order to ensure I have sampled sufficiently, I need to make sure the curve of the species accumulation plot reaches an asymptote, defined as a slope of &lt;0.3 between the last two points (ei between sites 12 and 13).</p>

<pre><code>results &lt;- with(accum, data.frame(sites, richness, sd))
</code></pre>

<p>Produces this:   </p>

<pre><code> sites richness        sd
1      1     3.46 0.9991916
2      2     4.94 1.6625403
3      3     5.94 1.7513054
4      4     7.05 1.6779918
5      5     8.03 1.6542263
6      6     8.74 1.6794660
7      7     9.32 1.5497149
8      8     9.92 1.3534841
9      9    10.51 1.0492422
10    10    11.00 0.8408750
11    11    11.35 0.7017295
12    12    11.67 0.4725816
13    13    12.00 0.0000000
</code></pre>

<p>I feel like I'm getting there. I could generate an lm with site vs richness and extract the exact slope (tangent?) between sites 12 and 13. Going to search a bit longer here.</p>