NEWS | R Documentation |
Version 0.12-0 represents a major update of analogue, including the addition of new functionality and long-required improvements to the computation of dissimilarity matrices which now uses faster C code.
Several of the dependencies are now only imported into the
namespace for analogue. As a result, existing code that did
not already load these packages will need to be updated to load
them via a call to library()
.
Highlights of the release are listed below. For a full record of changes made during the development leading up to this release see the ChangeLog in the package sources.
Dissimilarities are now computed using fast C code in
function distance()
. The new functions are tested against
the old code (now available as function oldDistance()
) to
ensure the new code performs correctly.
Fitting principal curves to palaeo data and working with the fitted objects is now much easier.
prcurve()
now returns each of the fitted smooth models as
part of component smooths
, allowing further examination of
the the individual fits.
There are now methods for lines()
and points
to
allow greater flexibility in producing plots of the fitted
principal curve. A scores()
method to extract ordination
scores for prcinipal curves is also available. A resid()
method is also available to return various types of residuals for
the principal curve.
smoothGAM()
is a new plugin smoother function for use with
prcurve()
, which allows GAMs to be used as smoothers fitted
to individual variables. It is significantly slower than
smoothSpline()
, but can handle non-Gaussian responses. The
underlying models are fitted using gam()
from mgcv.
As principal curves are smooth curves in high-dimensions it makes
sense to view them in 3D. analogue has a function for that:
the plot3d.prcurve()
method uses the underlying
functionality of the rgl package to provide an interactive
3D representation of the data and the fitted principal curve.
prcurve()
also returns the fitted ordination and the
original data, making it much easier to predict where passive
samples should lay and simpler to plot the curve.
New function (and S3 generic), sppResponse()
for
species responses along gradients. Currently the only supplied
method is for the results of prcurve()
fits, where the
function returns the fitted response curves along the principal
curve. A plot()
method is also available.
logitreg()
can now fit the logistic regression via
Firth's bias reduction method. This helps in cases where there is
complete or quasi-complete separation, and for cases where there
are far more no-analogues than analogues.
This release sees much improved functionality for fitting
principal component regression calibration models where the data
are subject to an "ecologically meaningful" transformation (such
as the Hellinger transformation). Models fitted with pcr()
can be cross-validated using the new crossval()
method, and
predictions from the fitted model can be computed using the
predict()
method. Both ensure that the transformation is
applied to the test or new data samples in the appropriate manner.
New function rankDC()
to compute the rank correlation
between gradient distances (e.g. environmental variables) and
distances in species composition. Has both base and Lattice
graphics plot methods (the latter via dotplot()
).
Stratiplot()
gains two new arguments: labelAt
and labelRot
, which allows control of the placement and
rotation of variable labels on the panels of the plot when not
using the strip.
The plot()
method for timetrack()
now allows
the plotting of linear combination or weighted average site
scores.
The fitted()
method for timetrack()
now has
argument which
, replacing the original type
.
There is a new scores()
method for objects eturned by
timetrack()
.
analog()
gains a method allowing it to work directly
on objects of class "distance"
, as returned by
distance()
. This avoids recomputing the dissimilarity
matrix if a suitable one is already available.
chooseTaxa()
no longer drops empty dimensions if the
conditions supplied result in a single species being
returned. Reported by Michael Burstert.
A warning about presence of NA
s when na.rm = TRUE
was supplied is also fixed.
The formula
method of timetrack()
was not
well-implemented for various reasons, and could result in the
species data not being transformed and other mistakes.
The new code takes a one-sided formula describing the constraints
for the underlying ordination, and variables in this formula will
be searched for in the data frame supplied as argument env
.
predict.wa()
would sometimes produce a 1-column
matrix during the deshrinking step, which would result in an
error. This empty dimension is now dropped so that a vector is
always returned from the deshrinking function.