ecodive 2.4.0
New
pcoa()runs a principal coordinates analysis (classical multidimensional scaling) on adistobject, such as frombeta_div(). It gives the same coordinates and eigenvalues ascmdscale(),ape::pcoa(), andvegan::wcmdscale()(up to each axis’s sign), but computes only the first few axes (k = 3by default), in parallel C, without forming an n-by-n matrix. Its results are identical for any number ofcpus.New
ordination()runs any ordination method by name, asbeta_div()does for beta diversity metrics, with the method’s own arguments.list_ordinations()andmatch_ordination()list and look up the methods. Every ordination method returns the same kind of result: a sample-by-axis matrix whose attributes start withmethod,eig, andprop.New
nmds()runs a non-metric multidimensional scaling, followingvegan::metaMDS()with itsmonoMDS()engine: a start from the PCoA solution, then random starts until the best solution is found again, then centering, rotation to principal components, and scaling. Its C port ofmonoMDSgives the same result asvegan::monoMDS()from the same starting configuration. Random starts run in parallel, one per thread, and share one sorted copy of the distances, so memory use is a fraction ofmetaMDS()’s. Random starts come from aseedargument, and results are identical for any number ofcpus.New
blas_threads()gets or sets how many threads R’s BLAS/LAPACK library uses, while R is running. It works with OpenBLAS, Intel MKL, BLIS, and FlexiBLAS, returnsNAwhere the count can’t be read (e.g. R’s reference BLAS or Apple’s Accelerate), and never raises an error, warning, or message. Setting is limited to what is safe: the count is never raised above the library’s own, and OpenMP’s thread count is left as it is. No other ecodive function calls it.
ecodive 2.3.2
-
Fixed
aitchison(), and every beta metric called withnorm = 'clr', returningNaN(or, forchebyshev(), wrong values) for every sample pair. Two bugs were involved:- Data with no zeros (pseudocount 0) hit
log(0) * 0, which isNaN. - The pseudocount was truncated to an integer in C, so values below 1, including the automatic
min(counts[counts > 0]) / 2, became 0, and values like 1.5 were silently rounded down.
- Data with no zeros (pseudocount 0) hit
gower()withnorm = 'clr'now computes each feature’s range, and the distance for features absent from both samples, from that feature’s CLR values instead of treating absent features as 0.gower()with negative inputs (e.g.norm = 'rclr') now also uses the full min-to-max range.
ecodive 2.3.1
CRAN release: 2026-11-05
-
read_tree()now handles quoted labels per the Newick standard:-
''inside a quoted label is decoded as one literal apostrophe, so'it''s'is read asit's. - Square brackets inside quotes are literal characters rather than comments, so labels like
'o__[Saprospirales]'are no longer truncated. - Newlines and whitespace inside quotes are preserved.
- Comments (
[...]) outside of quotes may contain apostrophes.
-
read_tree()raises an informative error, with the position of the problem, for malformed input such as an unclosed quote, comment, or parenthesis. Previously these could return a garbled tree.read_tree()’s parser is now linear-time and non-recursive, making it about 4x faster on a typical 100,000-tip tree and much faster on very deep trees.
ecodive 2.3.0
- Added
ecodiveJOSS citation information. - New
robust_aitchison()beta diversity function. - Switch from
testthatto dependency-freetinytestfor test suite. -
read_treefixes for edge cases.
ecodive 2.2.6
CRAN release: 2026-04-14
-
When using CLR normalization:
- Warns when zeros are detected and
pseudocountisNULL. - Then continues with
pseudocount <- min(counts[counts>0]) / 2.
- Warns when zeros are detected and
ecodive 2.2.4
Breaking Changes
-
The
rarefy()function has been simplified:-
drop = FALSEnow returns samples with original counts when sum < depth. -
drop = TRUEno longer drops zero-sum features - only zero-sum samples. -
depthcan no longer be a fraction (only positive integers now). -
n_samplesparameter has been removed. -
warnparameter has been added.
-
ecodive 2.2.0
CRAN release: 2025-12-03
- Dedicated rarefaction backends for dense and sparse matrices.
- Auto-conversion to col-major sparse matrix for distance/diversity calculations.
ecodive 2.1.0
CRAN release: 2025-09-26
Fixes
-
alpha_div()andbeta_div()will only forward applicable parameters. - No longer crashes when
pairs = integer(0). -
pseudocount = NULLcorrectly selects smallest non-zero count.
ecodive 2.0.0
CRAN release: 2025-09-21
Added New Diversity Methods
Updated Alpha Options:
c("ace", "berger", "brillouin", "chao1", "faith", "fisher", "simpson", "inv_simpson", "margalef", "mcintosh", "menhinick", "observed", "shannon", "squares")Updated Beta Options:
c("aitchison", "bhattacharyya", "bray", "canberra", "chebyshev", "chord", "clark", "sorensen", "divergence", "euclidean", "generalized_unifrac", "gower", "hamming", "hellinger", "horn", "jaccard", "jensen", "jsd", "lorentzian", "manhattan", "matusita", "minkowski", "morisita", "motyka", "normalized_unifrac", "ochiai", "psym_chisq", "soergel", "squared_chisq", "squared_chord", "squared_euclidean", "topsoe", "unweighted_unifrac", "variance_adjusted_unifrac", "wave_hedges", "weighted_unifrac")
