Convert an Accumulation Curve from Another Package to a spacc Object
Source:R/as_spacc.R
as_spacc.RdBring an existing species accumulation curve into the spacc object system so
it can be summarised, plotted, and compared with compare() alongside
spatial curves. A vegan specaccum object is currently supported.
Usage
as_spacc(x, ...)
# Default S3 method
as_spacc(x, ...)
# S3 method for class 'specaccum'
as_spacc(x, ...)Arguments
- x
An object to convert. A
specaccumobject fromvegan::specaccum()is supported.- ...
Ignored, for method extensibility.
Value
An object of class spacc with print(), summary(), plot(),
as.data.frame(), and compare() support.
Details
A specaccum object built with method = "random" stores one richness curve
per permutation in its perm matrix. Those curves become the rows of the
returned curves matrix and behave exactly like spacc seeds, so the
across-curve confidence band and the compare() permutation, bootstrap, and
AUC tests carry over unchanged. A specaccum object without a permutation
matrix (for example method = "exact" or "collector") contributes its
single mean curve.
Coordinates cannot be recovered from a specaccum object, so the result
carries no coords: it is a curve container for plotting and comparison, not
a re-runnable spatial object.
See also
compare() to test a converted curve against a spatial one.
Examples
# \donttest{
if (requireNamespace("vegan", quietly = TRUE)) {
data(BCI, package = "vegan")
classic <- vegan::specaccum(BCI, method = "random")
sp <- as_spacc(classic)
summary(sp)
plot(sp)
}
# }