Compute regional clade mean trait distance in a time series
clade_regional_distance.Rd
Compute regional clade mean trait distance in a time series
Usage
clade_regional_distance(
df.TS.TE,
time.slice,
dist.trait,
nearest.taxon,
trait = NULL,
round.digits = 1,
species = "species",
TS = "TS",
TE = "TE",
group = NULL,
group.focal.compare = NULL,
type.comparison = NULL
)
Arguments
- df.TS.TE
Data frame object containing at least four columns. Species names, origination time, extinction time and a trait value for each species.
- time.slice
Scalar indicating the time interval between consecutive time slices.
- dist.trait
A dist object containing the clade pairwise distance matrices. The name of the clades in this object must be equal to the name of the clades in df.TS.TE data frame.
- nearest.taxon
A scalar indicating the number of nearest species/genus that will be used. 1 computes mnnd metric and the option "all" computes mpd.
- trait
Character indicating the name of the column containing values of the traits for each species. If NULL, the default, the user must provide a distance matrix.
- round.digits
Scalar indicating the precision of time slices.
- species
Character indicating the name of the column of the data frame containing the species name information.
- TS
Character indicating the name of the columns of the data frame containing the information on origination time.
- TE
Character indicating the name of the column of the data frame containing the information on extinction time.
- group
Character indicating the name of the column that contain the groups that will be used in comparison.
- group.focal.compare
Character vector indicating the focal (first element) and comparison (second element) groups used in the calculation. If NULL, the default, the metrics will be calculated using all clades.
- type.comparison
Character. It can be "between" to compute distances only between species/genus of two groups or "within" to calculate distance only inside the focal group. If null the distance is computed considering all clades together