| compare | R Documentation |
Test whether two species accumulation curves differ significantly.
compare(
x,
y,
method = c("permutation", "bootstrap", "auc"),
normalize = FALSE,
n_perm = 999L,
...
)
x |
A |
y |
A |
method |
Character. Comparison method: |
normalize |
Logical. If |
n_perm |
Integer. Number of permutations/bootstrap replicates. Default 999. |
... |
Additional arguments passed to comparison methods. |
An object of class spacc_comp containing:
x_name, y_name |
Names of compared objects |
auc_diff |
Difference in area under curve |
p_value |
P-value from permutation test |
saturation_diff |
Difference in saturation points |
method |
Comparison method used |
normalized |
Whether curves were normalized before comparison |
Colwell, R.K., Mao, C.X. & Chang, J. (2004). Interpolating, extrapolating, and comparing incidence-based species accumulation curves. Ecology, 85, 2717-2727.
Gotelli, N.J. & Colwell, R.K. (2011). Estimating species richness. In: Biological Diversity: Frontiers in Measurement and Assessment, pp. 39-54. Oxford University Press.
coords <- data.frame(x = runif(50), y = runif(50))
sp_a <- matrix(rbinom(50 * 30, 1, 0.3), nrow = 50)
sp_b <- matrix(rbinom(50 * 30, 1, 0.5), nrow = 50)
sac_a <- spacc(sp_a, coords, n_seeds = 10)
sac_b <- spacc(sp_b, coords, n_seeds = 10)
comp <- compare(sac_a, sac_b)
print(comp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.