I am trying to create a plot in the style of the sample completeness~diversity order plot shown below, but referencing a different dataset.
The plot shown above is Fig. 3a in Chao et al. 2020.
I want to create a plot in this style for the ciliate
dataset included in the iNEXT
package, using principally functions iNEXT::iNEXT()
and iNEXT::ggiNEXT()
. I see that sample completeness values are contained in the output of function iNEXT()
as variable SC
in multiple places (shown below).
> library(ggplot2)
> library(iNEXT)
> data("ciliates")
>
> #define output of function iNEXT as object c
> c <- iNEXT::iNEXT(ciliates, datatype = "incidence_raw", q=c(0,1,2), se=TRUE, nboot = 10)
>
> head(c$iNextEst$size_based)
Assemblage t Method Order.q qD qD.LCL qD.UCL SC SC.LCL SC.UCL
1 EtoshaPan 1 Rarefaction 0 27.15789 25.46898 28.84681 0.1901378 0.1602758 0.2199998
2 EtoshaPan 2 Rarefaction 0 49.15205 46.46171 51.84239 0.3154101 0.2763704 0.3544499
3 EtoshaPan 3 Rarefaction 0 67.74407 64.36418 71.12395 0.4040033 0.3625663 0.4454402
4 EtoshaPan 4 Rarefaction 0 83.93008 80.01195 87.84822 0.4704869 0.4293215 0.5116523
5 EtoshaPan 5 Rarefaction 0 98.31054 93.93120 102.68989 0.5227274 0.4830091 0.5624458
6 EtoshaPan 6 Rarefaction 0 111.27226 106.47865 116.06587 0.5652248 0.5274311 0.6030185
>
> head(c$iNextEst$coverage_based)
Assemblage SC t Method Order.q qD qD.LCL qD.UCL
1 EtoshaPan 0.1901402 1 Rarefaction 0 27.15824 25.46933 28.84715
2 EtoshaPan 0.3154100 2 Rarefaction 0 49.15201 43.79056 54.51347
3 EtoshaPan 0.4040045 3 Rarefaction 0 67.74432 61.04684 74.44180
4 EtoshaPan 0.4704874 4 Rarefaction 0 83.93019 75.75317 92.10722
5 EtoshaPan 0.5227259 5 Rarefaction 0 98.31009 88.86377 107.75640
6 EtoshaPan 0.5652251 6 Rarefaction 0 111.27235 100.79007 121.75464
>
> c$DataInfo
Assemblage T U S.obs SC Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10
1 EtoshaPan 19 516 216 0.8017 107 44 26 14 6 5 4 3 2 2
2 CentralNamibDesert 17 379 130 0.8425 63 28 13 4 3 7 1 2 1 0
3 SouthernNamibDesert 15 358 150 0.7816 82 28 14 8 6 1 1 2 2 1
However, nowhere in object c
do I see unique combinations of assemblage (EtoshaPan
, CentralNamibDesert
, SouthernNamibDesert
), sample completeness value, and diversity order ("Order q" in plot above). Can a sample completeness~diversity order plot be created simply by setting the appropriate arguments in function ggiNEXT
? If not, what steps must I take in order to create it?
Edit: I'm not the only one asking this question: link
Reference: Chao, Anne, et al. "Quantifying sample completeness and comparing diversities among assemblages." Ecological Research 35.2 (2020): 292-314.
Link to reference: link