A modular package for measuring disparity (multidimensional space occupancy). Disparity can be calculated from any matrix defining a multidimensional space. The package provides a set of implemented metrics to measure properties of the space and allows users to provide and test their own metrics (Guillerme (2018)
Release:
Development (master):
CRAN:
Check out the paper associated with this package.
Check out the presentation or the video of some of the package's novel features.
if(!require(devtools)) install.packages("devtools")library(devtools)install_github("TGuillerme/dispRity", ref = "release")library(dispRity)
The following installs the latest release of dispRity (see patch notes below). For the piping hot development version (not recommended), replace the ref = "release"
option with ref = "master"
.
If you're using the master
branch, see the patch notes for the latest developments.
The package is available in the CRAN Task Views in Phylogenetics.
A detailed vignette is available online or as a pdf:
Otherwise, each functions has a detailed associated manual with examples in R
(?which.function
).
Additionally, you can learn more about the structure of dispRity
objects here.
2018/09/19 - v1.2 model tests
model.test
, model.test.sim
and model.test.wrapper
for fitting models of disparity evolution through time (with associated manuals, vignettes and S3
methods! Thanks to Mark Puttick).boot.matrix
: prob
for passing probabilities of sampling for specific elements.print
method for objects of class "dtt"
and "dispRity"
(from dtt.dispRity
).dtt.dispRity
now allows to specify the alternative hypothesis (if nsim > 0
).ellipse.volume
can now take an explicit eigen value vector (the eigen values are still automatically estimated correctly for PCO and MDS).make.metric
when dealing with optional arguments.plot.dispRity.dtt
.char.diff
to properly reflect the probability of different splits between characters (thanks to Abigail Pastore).Previous patch notes and notes for the next version can be seen here.
If you are using this package, please cite the paper:
To cite the dispRity
manual, please use:
To cite the time slicing method from the chrono.subsets
function, please use:
Some ideas/functionalities/implementations in this package where implemented following the suggestions of Natalie Cooper, Graeme Lloyd, Dave Bapst, Andrew Jackson and Martin Brazeau.
JW Clark, PCJ Donoghue (2018) Whole-Genome Duplication and Plant Macroevolution. Trends in plant science. DOI: 10.1016/j.tplants.2018.07.006
D Foffa, MT Young, TL Stubbs, KG Dexter, SL Brusatte (2018) The long-term ecology and evolution of marine reptiles in a Jurassic seaway. Nature Ecology & Evolution. DOI: 10.1038/s41559-018-0656-6
T Guillerme, N Cooper (2018) Time for a rethink: time sub‐sampling methods in disparity‐through‐time analyses. Palaeontology. 61: 481-493. DOI: 10.1111/pala.12364
Claddis.ordination
function.model.test
, model.test.sim
and model.test.wrapper
for fitting models of disparity evolution through time (with associated manuals, vignettes and S3
methods! Thanks to Mark Puttick).boot.matrix
: prob
for passing probabilities of sampling for specific elements.print
method for objects of class "dtt"
and "dispRity"
(from dtt.dispRity
).dtt.dispRity
now allows to specify the alternative hypothesis (if nsim > 0
).ellipse.volume
can now take an explicit eigen value vector (the eigen values are still automatically estimated correctly for PCO and MDS).make.metric
when dealing with optional arguments.plot.dispRity.dtt
.char.diff
to properly reflect the probability of different splits between characters (thanks to Abigail Pastore).Claddis.ordination
function.Claddis.ordination
function (with add = TRUE
).C
symbols properly.S3
methods.scale.dispRity
is now rescale.dispRity
.merge.subsets
is now combine.subsets
.time.subsets
is now chrono.subsets
- time.subsets
can still be called as an alias for the same function.Claddis.ordination
function to comply with the CRAN requirement (this function is still live in the GitHub version 1.1).custom.subset
can now automatically create clade-based groups if a phylo
object is passed to group
.extinction.subsets
, to get the list to be passed to test.dispRity
for testing the effect of extinction.dtt.dispRity
, a wrapper for geiger::dtt
. This version is slower that geiger::dtt
but allows any univariate disparity metric!adonis.dispRity
, a wrapper for vegan::adonis
.crown.stem
for separating a tree into crown and stem groups.span.tree.length
the length of the minimum spanning tree.pairwise.dist
: the element's pairwise distances.radius
: the radius of each dimensions.n.ball.volume
: the n-dimensional sphere or ellipsoid volume.time.subsets
, model = "equal.split"
and model = "gradual.split"
that retain the probability of being either the descendant or the ancestor. This probability is passed to boot.matrix
.stats::dist
to vegan::vegdist
to allow more distances to be passed through methods
arguments.slice.tree
can now slice through a single edge.tree.age
to estimate ages for trees with fossils only.subsample
is now replaced by subset
(e.g. time.subsamples
is now renamed time.subsets
, data$subsamples
is now data$subsets
, etc...).time.subsets
, model = "gradual"
is now replaced by model = "proximity"
and model = "punctuated"
is now replaced by model = "random"
.ancestral.distance
to get the distance from taxa/nodes to their ancestors.random.circle
for generating random circle coordinates (see example in space.maker
for creating doughnut spaces!).get.bin.ages
for getting the geological timescale of a tree (based on geoscale
).t0
argument to time.subsamples
allowing to set the start age of the first subsample.slice.tree
.Claddis.ordination
and geomorph.ordination
for automatically ordinating data from Claddis
and geomorph
packages!char.diff
for calculating character differences and associated plot function (plot.char.diff
)merge.subsamples
for... merging subsamples.size.subsamples
for getting the size of subsamples in a disparity object.dispRity.through.time
and dispRity.per.group
now runs easy default disparity analysis.n*(n-1)
. Bigger matrices now only trigger a warning.dimensions
optional argument to dispRity
to overwrite the number of dimensions generated by boot.matrix
.variances
, ranges
and centroids
are now simplified for speed. The optional arguments for data cleaning are now passed to make.metric
.space.maker
now allows to approximate the dimensions variance distribution with the scree
option.hyper.volume
metric for dependencies reasons,parallel
option from boot.matrix
(the new architecture is already super fast: <2sec for 5k taxa and 10k bootstraps!).series
as a part of dispRity
objects is now changed to subsamples
throughout the whole package.time.series
is now renamed time.subsamples
, if dates are provided and method is discrete
, this function doesn't need a phylogeny any more.get.subsamples.dispRity
is now renamed get.subsamples
.cust.series
is now renamed custom.subsamples
(to avoid confusion with custard.subsamples
!). Its factor
argument as been changed to groups
and can now take a simple list.dispRity
object architecture (see more here).sim.morpho
can now use model = "mixed"
for using both HKY-binary
and Mk
in characters simulation.dispRity
object utilities are now all grouped under the ?dispRity.utilities
manual with appropriate S3 methods.rm.last.axis
argument in boot.matrix
. It is now replaced by dimensions
.plot.dispRity
, type = "lines"
is now replaced by type = "line"
.merge.time.series
for cleaning or merging time series,.dispRity-simulate_data
on how to simulate morphological characters in dispRity
.sim.morpho
generates morphological matrices.check.morpho
for checking how "realistic" the simulate morphological matrices are.get.contrast.matrix
and apply.inapplicable
functions for morphological matrices.pair.plot
, scale.dispRity
and sort.dispRity
.space.maker
for creating some multidimensional spaces!convhull.surface
, convhull.volume
and hyper.volume
.null.test
.plot.dispRity
arguments: density
for controlling the polygons density and add
for adding plots.dispRity
, test.dispRity
, plot.dispRity
, and summary.dispRity
can now intake one or more distribution rather than just one or more single values of disparity; whether the data is bootstrapped or not).dispRity
can now intake dispRity
objects with level 2 disparity metrics.boot.matrix
and dispRity
can now run in parallel.centroids
disparity metric can now use a centroid
argument for fixing the centroid point value.variances
and ranges
disparity metrics can now intake a k.root
argument for scaling the results.type_discrete
argument in plot.dispRity
and type
argument can now be:
continuous
disparity curves.box
for real boxplots.lines
for the distribution vertical lines.polygon
for the distribution boxes.get.dispRity
for subsampling dispRity objects.extract.dispRity
for extracting disparity results.test.dispRity
for applying tests to dispRity
objects.make.metric
for helping creating your very own disparity metric.hyper.volume
for measuring the morphospace hyper-ellipsoid volume.metric
argument from dispRity
can now intake up two three functions (see dispRity.metric
and make.metric
).plot.dispRity
options improved (rarefaction + default).cust.series
can now intake multiple factors columns.boot.matrix
, dispRity
, summary
and plot
now also include observed values.plot
now has an observed
option to plot the observed disparity.taxa
to elements
.plot
option diversity
has been renamed elements
.