arc() computes its point estimate faster; the estimator
is the same. On 2,500 grid cells of GBIF occurrence records (55 km
cells, five taxonomic groups) the mean time of
arc(x, n_boot = 0, parallel = FALSE) fell from 22.0 ms to
0.60 ms. By the number of records of species seen at most K
times: 1.5 to 0.15 ms for 3 to 10 records, 4.5 to 0.28 ms for 11 to 100,
33 to 0.86 ms for 101 to 1,000 and 92 to 1.9 ms above 1,000. The
bootstrap interval (n_boot = 2000, one core) of a sample
with 337 species took 7 s instead of 58 s; its 2,000 refits fell from
about 55 s to 1.6 s, and the penalty fits of the Poisson mixture (about
4 s) are unchanged.spacc(method = "knn") 6.0 s to 0.42 s,
spaccHill() 31 s to 1.8 s, spaccCoverage() 10
s to 0.36 s, spaccPhylo() 284 s to 2.7 s. Hill numbers
agree with the previous version to about 2e-14 (relative, summation
order); all other outputs are identical.spaccWavefront(), distanceDecay(),
taxonomic spaccBeta(), zetaDiversity(),
betaDecay() and the Gaussian method no longer build an n x
n distance matrix from coordinates; distances are evaluated from the
coordinates with the same rounding. spaccBeta() at 50,000
sites: 26.5 s and 19 GB to 0.48 s and 0.3 GB, identical results.kncn, 50,000 sites, one thread: 570
s to 28 s); orders are unchanged.kncn above the tree threshold no longer queries the
ball tree. The centroid moves little per step, so each unvisited site
keeps its distance from an earlier centroid, and by the triangle
inequality only the sites that the centroid’s movement since then could
make the nearest are evaluated again (about 15 per step at 50,000
uniformly scattered sites). 20,000 sites, 4 seeds, one thread: Euclidean
0.36 s to 0.08 s, haversine 0.67 s to 0.23 s; orders are unchanged.betaDecay() fits the exponential and power models by
compiled Levenberg-Marquardt steps and starts nls() at that
solution, which then converges in one or two iterations; the curves and
gradients nls() evaluates are compiled too (2,000 sites:
8.2 s to 2.3 s).ses() are compiled code drawing the same random numbers
as before (1,000 sites, curveball: 65 s to 1.1 s).arc() computation:
betaDecay() fitted the power model to
log(beta) of the pairs with beta > 0 and
compared its AIC with the AIC of the other models, fitted to
beta of all pairs, so the power model could not be
selected. All three models are now fitted by least squares to
beta of all pairs at positive distance, as
betapart::decay.model() does; fits$power is an
nls fit.spaccEndemism(map = TRUE) gave every site total
richness. Per-site values are now endemism richness (Kier et al. 2009):
each species contributes 1 / (number of sites it occupies),
so the map sums to total richness.sfar() implements the species-fragmented area
relationship of Hanski et al. (2013),
S = c A^z exp(-b / lambda) with lambda the
metapopulation capacity of the accumulated fragments. The old fit used
the number of fragments capped at the number of patches. New arguments
dispersal and scaling; the coefficient is
b (was f); the unused model
argument is gone.sesars() sums effort along each seed’s accumulation
order (it summed effort in increasing order of effort). Citation
corrected to de la Sancha & Boyle (2019, PLOS ONE); Azovsky (2011)
added.ses() p-values: two-sided
(b + 1) / (n + 1) (Phipson & Smyth 2010) with ties
counted in both tails; a step where all null curves equal the observed
one now gets p = 1. Code and help agree.spaccBeta(tree = ) partitions
shared and unique branch length (Leprieur et al. 2012) and matches
betapart::phylo.beta.pair(); complete turnover scored 0
before. Non-ultrametric distance matrices and unrooted trees are
rejected.interpolateCoverage(),
extrapolateCoverage() and spaccHillCoverage()
rarefy the first site’s individuals for targets below its coverage (they
returned the first site’s richness); matches
iNEXT::estimateD(). Chao-Jost coverage with no doubletons
uses the iNEXT form.extrapolateCoverage() prints distinct labels for
targets such as 0.99 and 0.999.bootstrap_richness() uses the Smith &
van Belle (1984) variance (equal to vegan::specpool()), and
loses n_boot; rarefy() bootstraps from the
estimated assemblage (Chao et al. 2014); mao_tau() uses
Colwell et al. (2004) Eq. 6 (equal to
vegan::specaccum(conditioned = FALSE)), so no bound falls
below zero.chao1() (coefficient 1/2 on the r²
term, Chao 1987; equals iNEXT), jackknife() both orders
(Burnham & Overton; equal to SpadeR), ace() (Chao &
Lee delta method), iChao1() and iChao2()
(delta method). iChao2() gains the missing
(t - 3) factors.diversityPartition() builds gamma with the same site
weights as alpha and uses w^q weights for unequal alpha
weights (Jost 2007).kncn: one
ball tree for Euclidean and haversine removes visited sites (5,000
sites, 50 seeds: 37 s to 0.03 s). Tree and exact backends return
identical orders. nanoflann is no longer bundled.n_cores caps the number of threads (it switched only
between serial and all threads).spacc_dist matrix is the distance of every order,
including knn, kncn and cone
(they used coordinates). cone with haversine distances uses
great-circle bearings.compare(method = "bootstrap") returns a bootstrap
p-value (Efron & Tibshirani 1993, Algorithm 16.2) and the percentile
interval of the area difference (auc_diff_ci); it returned
0.05 or 0.5. Permutation p-values use (1 + b) / (n + 1) and
are never 0.plot(show_seeds = TRUE) drew lines mixing values from
different seeds.map = TRUE in spaccHill(),
spaccCoverage(), spaccBeta(),
spaccPhylo() and spaccFunc() stored the last
value of each site’s curve, where every site has been accumulated, so
the map was the same at every site (beta: the step that added the
farthest site). The map now holds each site’s value for its
neighbourhood of map_k sites (beta: the first
map_k - 1 sites against the map_k-th).
map_k is required with map = TRUE;
spaccCoverage() map columns are named
coverage, richness and
individuals (were final_*).spacc(support = ) subsets a spacc_dist
matrix and the time vector together with the sites; both
failed before.spaccBeta() computes its orders exactly as
spacc() does (the tree backend above the size threshold)
and returns them as orders.ses() works on spaccBeta() objects (every
permutation failed), and the null curves keep time,
w_space, w_time, sigma and
cone_width of the observed curve.arc()
bootstrap refits) differed from serial ones in the last digits.compare(method = "bootstrap") is the two-sided form of
Efron & Tibshirani (1993, Algorithm 16.2); exact equation and page
references for the permutation p-values (Davison & Hinkley 1997),
the Jost (2007) weights and the great-circle bearing (Snyder 1987).sfar() requires dispersal, the mean
dispersal distance of the taxon, taken from independent data as in
Hanski et al. (2013); the fitted b depends strongly on it
and no source gives a general value.spacc(time = ) works with "knn",
"kncn", "nn_walk", "gaussian" and
"cone": the space-time distance is used like a
spacc_dist matrix, and a spacc_dist input
supplies its spatial part. "random" and
"collector" read no distance and give an error with
time, as do focal_points.arc() returned
a number tens of orders of magnitude above the observed richness for
such input and still does, but not the same number.spaccPhylo(metric = "evoheritage", rho = ) accumulates
EvoHeritage (Rosindell et al. 2024), phylogenetic diversity with
attrition of evolutionary heritage at rate rho.
rho = 0 reproduces Faith’s PD; a vector rho
gives one curve per rate (#7).chao2(x, n_units = ) estimates richness for sites drawn
without replacement from a finite set of n_units units
(MoRE, Chiu 2023), which reaches the observed richness when every unit
is sampled instead of overestimating it.
extrapolate(n_units = ) compares the asymptote with MoRE
and uses it as the reference for the disagreement warning (#14).arc() estimates total richness with the accumulation
rate curve estimator of Shestopaloff (2025): log-normal, log-logistic
and Weibull fits to the rate at which new species appear, combined with
capped weights, with a parametric bootstrap interval from a penalised
Poisson mixture of the frequency counts. data = "incidence"
runs it on site occupancy. The weights are the minimum of the paper’s
loss reached by gradient flow from zero weights, the one the author’s
reference code reaches (#13).spaccCoverage(coverage = "chiu", n_units = ) gives the
matching sample coverage: the undetected abundance uses the MoRE
estimate of the undetected species, so the coverage reaches 1 when every
unit is sampled (#14).spaccHillBeta(standardize = "coverage", coverage = )
standardises gamma and alpha to a common sample coverage at every step
(iNEXT.beta3D, Chao et al. 2023) and returns the four dissimilarities
1-CqN, 1-UqN, 1-VqN,
1-SqN. Final-step values match
iNEXT.beta3D::iNEXTbeta3D() (#6).spaccFunc(metric = "K") accumulates the aggregated
functional diversity K of Wojcik et al. (2024) with its four facets
(k_richness, k_biomass_evenness,
k_trait_evenness, k_dispersion); K is defined
from two species on (#8).spaccRedundancy() tracks phylogenetic or functional
redundancy along the accumulation: the ratio of the taxonomic Hill
number to the phylogenetic (Chao et al. 2010) or similarity-sensitive
functional (Leinster & Cobbold
2012) Hill number of the accumulated community (#9).spaccBeta(pool = ) repeats the turnover/nestedness
partition between pooled assemblages (habitats, regions) along the same
site orders, next to the site-level partition (Jones et al. 2025);
summary() and plot() take
resolution = "site", "pooled" or (plot)
"both" (#11).ses(null_model = "shift_rotate") keeps the community
and moves a fixed sampling design (user-supplied
focal_points of a knn analysis) by random
rotations and shifts (Ridder et al. 2024), testing the design’s position
rather than the community’s spatial structure (#12).as_spacc() converts a numeric curve or a data frame
column, including the output of Rarefy::directionalSAC()
and Rarefy::rare_alpha().
spacc(method = "knn", focal_points = coords) is checked to
reproduce Rarefy’s directional curve exactly (#16).spaccNetwork() accumulates an interaction network over
space: interaction richness and Hill numbers, sample coverage, the
species curves of both levels and connectance along the same orders
(Chiu et al. 2023) (#15).spaccFunc(itv = TRUE) takes traits per individual or
population (a long table with species, optional
site and trait columns) and evaluates FDis, FRic, Rao’s Q
and K on the trait rows of the accumulated sites; one row per species
reproduces the species-mean curves (#17).dar() is an S3 generic: besides a site-by-species
matrix it takes a spacc, spacc_hill,
spacc_phylo, spacc_func or
spacc_redundancy object and returns the diversity-area
relationship of each of its curves, along the same site orders, with a
power-law fit per curve (coef()). The area kernels are C++
(incremental convex hull, Voronoi cells), so dar() no
longer needs sf. The result carries curves,
metric and the curve object it was built from
(formerly hill) (#10).src/core/inext_core.h),
matching iNEXT.3D.ses() on spacc_phylo and
spacc_func objects always stopped with “Too few valid
permutations”: their null analyses were never rerun. The objects now
carry their tree, traits and metric settings, and ses()
reruns them.ses() reran knn analyses with newly drawn
focal points; the nulls now reuse the observed design, and
spacc_beta nulls keep the distance method.extrapolate() and compareModels() passed
unknown arguments (such as progress = FALSE) on to
nls(), which treated them as data, so every model “failed
to converge”. Unknown arguments are now an error. The extrapolation
vignette’s model comparison had been all failures for this reason.dar(area_method = "voronoi") computed bounding-box
areas; it now sums the Voronoi cells of the accumulated sites. The
convex-hull area of one or two sites is 0 instead of their bounding
box.diversityProfile(tree = ) scaled branch lengths by the
maximum root-to-tip depth. It now uses the abundance-weighted mean depth
of Chao et al. (2010), which is the same for an ultrametric tree and
keeps the profile equal to the taxonomic one on a star tree otherwise.
Phylogenetic and functional profiles run on the C++ kernels shared with
spaccRedundancy().rarefy() with q = 1 or q = 2
returned the Hill number of the full sample at every size (q = 1 plugged
the sample proportions into Shannon, q = 2 ignored the subsample size).
It now returns the expected Hill number of a random subsample at every
order, matching iNEXT.3D, and extrapolates sizes above the sample
size.extrapolateCoverage() with q = 1 or
q = 2 interpolated the richness curve within the observed
coverage and applied ad hoc corrections beyond it. It now reads the Hill
curve of the requested order (a spaccHillCoverage() object;
a spacc_coverage object carries q = 0 only)
and extrapolates the pooled sample with the Chao et al. (2014)
estimators, which also replace the reconstructed singleton counts used
for q = 0.spaccPhylo() PD matched species to tree tips by column
position, so it was wrong when colnames(x) were not in
tree$tip.label order and read past the community when the
tree held more tips than x had species. Species are now
matched to tips by name.src/orders.cpp), and one kernel accumulates species along
those orders (src/accumulate.cpp). The per-method
serial/parallel/tree copies of the traversal (knn.cpp,
kncn.cpp, random.cpp,
methods.cpp, metrics.cpp) are gone;
spacc(), spaccMetrics(),
spaccDiversity() and the metric front doors all take their
site orders from .accumulation_orders().OrderMetricWorker in
src/parallel_utils.h); each metric is a small struct with
an at_step() method. The pure kernels live in
src/core/ (phylo_core.h and
func_core.h are new) and are the single implementation
behind both the exported single-community functions
(calc_mpd(), calc_fdis(), …) and the
accumulation workers..curve_stats(), .curve_frame(),
.plot_curves_by(), .plot_site_map() and
.as_sf_site_values(); the autoplot() methods
are one delegating function registered per class.spacc objects carry the site orders their
curves were accumulated along.method = "gaussian" draws from R’s random number
generator, so seed (or set.seed()) now
reproduces its curves. It previously used an unseeded C++
generator.method = "kncn" with
distance = "haversine" measures centroid distances with the
haversine formula on both backends; the exact backend used planar
distances on longitude/latitude..accumulation_orders() computes a distance matrix only
for the methods that need one, so spaccHill(),
spaccPhylo(), spaccFunc(),
spaccCoverage() and spaccEndemism() no longer
build an n x n matrix for the fixed-focus knn
method.as_sf() and plot(type = "map") on an
object computed without map = TRUE fail with one message
for every class: “No map data. Rerun method = "knn" now implements fixed-focus spatially
constrained rarefaction: continuous focal points are sampled from the
spatial domain and all sites are ranked by distance from each focus.
Supply focal_domain for a known polygonal study boundary or
focal_points for exact focal coordinates. The former greedy
current-site traversal is now method = "nn_walk".
method = "radius" was removed because its observed-site
fixed-focus ordering duplicated the corrected knn concept.
spaccWavefront() remains the radius-indexed accumulation
front door.
Diversity, coverage, beta, phylogenetic, functional, endemism, metric, and diversity-area calculations now consume shared site-order matrices. This keeps the selected spatial rule identical across downstream quantities.
Spatial-accumulation curves use the spaccWavefront()
front door. The distance- and area-relationship functions keep their
established names: distanceDecay(),
betaDecay(), zetaDiversity(), and
dar().
spaccBeta() gains traits and
tree arguments and computes taxonomic, functional, or
phylogenetic beta diversity from a single front door. Supplying
traits gives the trait-weighted Baselga partition;
supplying tree gives the branch-length-weighted (PhyloSor)
partition.
diversityProfile() gains traits and
tree arguments and computes taxonomic, functional
(Leinster-Cobbold), or phylogenetic (Chao et al.) Hill profiles from a
single front door.
extrapolateArea() extrapolates richness to a spatial
extent larger than the one sampled, using the total-species (T-S) curve
of Ugland, Gray & Ellingsen (2003): sites are partitioned into
spatial subareas, the expected total richness of random subarea
combinations is plotted against their convex-hull area, and an
asymptotic model is fitted and extended to a target area with a
median-bias-corrected site-bootstrap interval. New
spacc_area class with
print()/summary()/plot()/predict()/as.data.frame()
methods.
extrapolate() gains a calibrated
interval = "bootstrap" (now the default) that refits the
chosen model across resampled seed curves and returns percentile bounds,
replacing the over-confident nls profile interval as the
default. predict(fit, interval = "bootstrap") returns a
prediction band, and plot() draws it.
interval = "profile" recovers the old behaviour.
extrapolate() now reports goodness of fit (residual
RMSE over the observed range), an extrapolation-range note, and the
nonparametric chao2()/iChao2() estimates
alongside the asymptote. It warns when the asymptote exceeds the
observed richness by more than warn_ratio (default 2), when
it disagrees with chao2() by more than 50%, and when
predict() is evaluated beyond ~2.5x the sampled
effort.
plot() on a spacc_endemism object no
longer lists “Endemic species” twice in the legend. The confidence-band
fill was drawn as its own guide because the ribbon covered only the
endemism series; that fill guide is now suppressed so a single
line-colour legend remains.
Removed a stray blank line beneath the y-axis title in
plot() for spacc_beta objects.
extrapolate() asymptote confidence intervals are no
longer over-confident. The previous confint() used an
nls profile interval on the (ultra-smooth) mean curve,
ignoring across-seed variability; it could exclude the truth in every
replicate of a recovery simulation. confint() now returns
the calibrated bootstrap interval by default
(method = "profile" is still available). The documentation
notes that the parametric asymptote can be biased high on clustered or
under-sampled data and points to the nonparametric estimators for
calibrated total-richness intervals (#1, #3, #5).
extrapolate() recovers truth on near-saturation data,
extrapolateArea() interpolates the observed area, and the
Hill, phylogenetic, functional, and coverage accumulation endpoints
match their defining formulae (#2).evenness(),
diversityProfile(),
spatialEigenvectors()/spatialPartition(),
wavefront(), and compareModels()).spaccDiversity() objects gain a dedicated
plot() method with a metric-neutral default y-axis label
(“Cumulative diversity”) and a ylab/title
argument, so custom-metric curves are no longer labelled as species
counts.spaccPhylo() and spaccFunc() now accept
non-integer abundances (e.g. cover or biomass) for Rao’s Q and FDis
weighting. The phylogenetic and functional accumulation backends use
double-precision community matrices instead of truncating to integers.
Presence-based metrics (MPD/MNTD/PD/FRic) are unaffected.spaccPhylo() and spaccFunc() gain a
"rao" metric: abundance-weighted mean pairwise distance
(phylogenetic cophenetic distance, or Euclidean trait distance),
accumulated along the spatial curve.spaccPhylo() no longer binarises its input, so
abundance data now weights Rao; presence metrics (MPD/MNTD/PD) are
unchanged.sum_i sum_j p_i p_j d_ij.spaccDiversity() accumulates any user-supplied index
along a spatial ordering: at each step the cumulative community is
passed to a function that returns a scalar. Supports knn,
kncn, nn_walk, random, and
collector orderings, abundance or incidence input, and
extra arguments.spacc_diversity object inheriting
spacc, so the standard summary(),
plot(), as.data.frame(), and
predict() methods apply.rarefy() now accepts any q >= 0 (q = 0,
1, 2 keep their exact estimators; other orders report the Hill number of
order q) instead of silently falling back to richness.spacc() gains an order argument for
supplying an explicit accumulation sequence, bypassing distance
computation and seed sampling.
seq_len(nrow(x)).cpp_order_parallel(), which reuses the
random-accumulation worker with caller-supplied orderings.spaccHill() - Spatial accumulation with Hill numbers (q
= 0, 1, 2)
spaccBeta() - Beta diversity accumulation with
partitioning
spaccCoverage() - Track sample coverage during
accumulationinterpolateCoverage() - Interpolate richness at target
coverage levelsspaccPhylo() - Phylogenetic diversity accumulation
spaccFunc() - Functional diversity accumulation
spaccMetrics() - Extract accumulation metrics per site
slope_10, slope_25: Initial accumulation
slopeshalf_richness, richness_Npct: Sites to
reach richness thresholdsauc: Area under accumulation curveas_sf() - Convert metrics to sf for spatial
analysisplot(type = "heatmap")support parameter in spacc() for
areaOfEffect integration
spacc(species, coords, support = "France")aoe_result
objectsinclude_halo = FALSE for hard/political boundariescpp_knn_parallel_seeds() - legacy nearest-neighbour
walk with explicit seed indicesInitial release.
spacc() - Main function with multiple spatial sampling
methods:
knn: k-Nearest Neighbor (always visit closest
unvisited)kncn: k-Nearest Centroid Neighbor (visit closest to
centroid)random: Random order (null model)radius: Expand by distance from seedgaussian: Probabilistic selection weighted by
distancecone: Directional expansion within angular
constraintcollector: Sites in data orderwavefront() - Expanding radius accumulationdistanceDecay() - Distance-decay relationshipscoleman() - Coleman expected accumulationmao_tau() - Mao Tau (exact) expected accumulationcollector() - Collector’s curve (data order)spatialRarefaction() - Spatially-constrained
rarefactionextrapolate() - Fit asymptotic models
(Michaelis-Menten, Lomolino, etc.)compare() - Statistical comparison between curvesrarefy() - Rarefaction to common effortsubsample() - Subsample sites spatially