dispRitreats {treats} | R Documentation |
dispRity interface for treats objects
Description
Pass a treats
object to the dispRity
function.
Usage
dispRitreats(data, ..., scale.trees = TRUE)
Arguments
data |
an output from |
... |
any other arguments to be passed to |
scale.trees |
logical, whether to scale the tree ages in all simulations ( |
Details
This function applies the dispRity
package pipeline to the treats
output. If multiple simulations are input, the data is scaled for all the simulations.
The scale.trees
option allows the trees to have the same depth and root age. This option is recommended if chrono.subsets
options are called to make the output results comparable.
Common optional arguments for the following arguments include the following (refer the the specific function for the arguments details):
-
custom.subsets
:group
for the list of elements to be attributed to specific groups; -
chrono.subsets
:method
for selecting the time binning or slicing method;time
for the number of time bins/slices or their specific ages;model
for the time slicing method; orinc.nodes
for whether to include nodes or not in the time subsets; -
boot.matrix
:bootstraps
for the number of bootstrap replicates;rarefaction
for the number of elements to include in each bootstrap replicate; orboot.type
for the bootstrap algorithm; -
dispRity
:metric
for the disparity, dissimilarity or spatial occupancy metric to apply to the data; ordimensions
for the number of dimensions to consider.
Value
Outputs a "dispRity"
object that can be plotted, summarised or manipulated with the dispRity
package.
Author(s)
Thomas Guillerme
See Also
treats
dispRity
chrono.subsets
custom.subsets
boot.matrix
plot.dispRity
summary.dispRity
Examples
## Simulate a random tree with a 10 dimensional Brownian Motion trait
my_treats <- treats(stop.rule = list("max.taxa" = 20),
traits = make.traits(BM.process, n = 10),
bd.params = make.bd.params(speciation = 1))
## Calculating disparity as the sum of variances
disparity <- dispRitreats(my_treats, metric = c(sum, variances))
summary(disparity)
## Calculating disparity as the mean distance from the centroid of
## coordinates 42 (metric = c(mean, centroids), centroid = 42)
## using 100 bootstrap replicates (bootstrap = 100) and
## chrono.subsets (method = "continuous", model = "acctran", time = 5)
disparity <- dispRitreats(my_treats,
metric = c(mean, centroids), centroid = 42,
bootstraps = 100,
method = "continuous", model = "acctran", time = 5)
plot(disparity)
## Simulate 20 random trees with a 10 dimensional Brownian Motion trait
my_treats <- treats(stop.rule = list("max.taxa" = 20),
traits = make.traits(BM.process, n = 10),
bd.params = make.bd.params(speciation = 1))
## Calculating disparity on all these trees as the sum of variance
## on 5 continuous proximity time subsets
disparity <- dispRitreats(my_treats, metric = c(sum, variances),
method = "continuous", model = "proximity", time = 5)
plot(disparity)