base is deprecated and ignored (with a warning when a
value other than exp(1) is supplied). Hill numbers do not
depend on the base of the logarithm, and previous versions returned
incorrect values when base was not
exp(1).hill_func_parti_pairwise() computes trait distances
once from all species and uses them for every pair, instead of
recomputing (Gower or scaled Euclidean) distances for each pair. Results
now match hill_func_parti() with the same distance
matrix.hill_taxa_parti_pairwise() and
hill_phylo_parti_pairwise() now honor
rel_then_pool = FALSE (it was silently ignored).hill_func() and
hill_func_parti(traits_as_is = TRUE) match species to
traits by name. Previously results were wrong when the rows of
traits (or the distance matrix) were not in the same order
as the columns of comm.hill_func() and hill_phylo() keep sites
without species and return NA for them, so the output
always lines up with the rows of comm.
hill_taxa() returns NA for such sites also
when comm has no row names, and with
MARGIN = 2 no longer drops them.hill_phylo_parti(check_data = FALSE) applies
rel_then_pool.comm
contains missing (NA) or infinite values. Previously
hill_taxa() silently returned wrong values for such sites
(richness 0, and 1 or Inf for q > 0), and
the other functions failed with “missing value where TRUE/FALSE
needed”.pairs = "full", the diagonal of the pairwise
functions compares each site with itself (beta diversity and
similarities of 1) instead of being set to 1 for all measures.hill_func() no longer errors when traits
has species not in comm, or when a species has zero total
abundance.traits_as_is = TRUE accepts both dist
objects and matrices in hill_func() and
hill_func_parti().hill_func_parti() removes species with missing values
of a single trait also when show_warning = FALSE.hill_func(div_by_sp = TRUE) keeps the row names of its
output.hill_taxa_parti() and hill_func_parti()
report their own error instead of “invalid argument type” when relative
abundances do not sum to 1.NaN, remove empty sites as
their warning says, and respect show_warning.hill_phylo(),
hill_phylo_parti() and
hill_phylo_parti_pairwise() explain which phylogeny each
measures on: hill_phylo() uses one shared reference tree
for all sites, while hill_phylo_parti() and
hill_phylo_parti_pairwise() use the tree of the species in
the sites being compared.hill_phylo_parti_pairwise() no longer prunes the tree for
every pair. In simulated data, hill_taxa_parti_pairwise()
with 100 sites took 0.2 s instead of 5 s, and
hill_phylo_parti_pairwise() with 40 sites took 0.02 s
instead of 3 s.hill_func_parti() computes alpha diversity in closed
form instead of building an N x S x N x S array, so memory no longer
grows with the square of sites times species.hill_func(), hill_taxa() and
hill_phylo() use matrix operations instead of loops over
sites.hill_phylo() accumulates abundances up the tree level
by level and processes sites in chunks to limit memory; with 5000 sites
and 10000 species it takes about 2 s instead of about 22 s in hillR
0.5.2.plyr, geiger and ade4 are no
longer dependencies (the simple matching distance for a single
categorical trait, previously from ade4::dist.binary(), is
computed directly and gives the same values).This release includes the changes made for 0.6.0, which was not released on CRAN.
hill_phylo() once again measures all sites against the
same reference tree (the phylogeny of all species in comm),
so branches between the root and the most recent common ancestor of a
site’s species are included, following Chao et al. (2010). This restores
the results of hillR 0.5.2 and agrees with adiv::evodiv()
and phylospatial::ps_diversity(). The 0.6.0 development
version had dropped those branches for each site, which changed results
and gave NA for sites with a single species.trim_to_site in hill_phylo()
(default FALSE). Set it to TRUE to measure
each site on the subtree of its own species, which gives the same result
as analyzing that site on its own. Sites with a single species then get
NA. Unlike the 0.6.0 implementation, this also works with
rel_then_pool = FALSE.hill_phylo() now works when comm is a
matrix with a single site (it was previously collapsed to a vector,
giving an error).hill_taxa() returns NA for sites without
any species when q > 0 (previously 1 or
Inf).hill_phylo() stops with an informative error if fewer
than 2 species remain after cleaning the data.hill_*(), hill_*_parti() and
hill_*_parti_pairwise() functions now remove sites without
any species (with a warning) in addition to species not observed in any
site. This fixes errors in hill_taxa_parti() and
hill_func_parti() when comm contains empty
sites.inherits() to check classes
and fix typos.vegetarian package, which was off
CRAN.hill_phylo has an argument return_dt now,
so that users can decide whether to return the Phylogenetic Hill numbers
Dt, default is FALSE.hill_phylo set of functions are now much faster after
getting rid of ade4::newick2phylog().. in arguments with _ to
standardize styles.hill_phylo_parti_pairwise now calculate the node/tips
by site matrix first to speed things up.hill_xxx_parti_pairwise
functions with .progress argument, which can be set to
FALSE to turn it off.NEWS.md file to track changes to the
package.hill_func and hill_func_parti no longer
standardize distance matrix to have max value of 1 by default.
stand_dij = TRUE if want to do so.hill_func_parti function now reports site
similarity instead of dissimilarity, to be consistent
with the hill_taxa_parti functions. Make sure to change
your interpretations.hill_phylo functions.