checktree {idar} | R Documentation |
Check Trait and Phylo Data
Description
Checks consistency of names of species in spatial, phylogenetic and traits data.
Usage
checktree(tree, mippp, idar, correct.phylo)
checktraits(traits, mippp, idar, correct.trait.na, correct.trait)
Arguments
tree |
A phylogenetic tree in |
traits |
A data.frame of traits, or a distance matrix among species (in dist or matrix format) computed on a data.frame of traits. |
mippp |
A multitype (a.k.a. multivariate) marked point pattern . An object with the ppp format of spatstat, with the names of species as marks. |
idar |
Character. The name of the idar fucntion to be computed. Either "isar", "ipsvar", "ipsrar", "ipsear", "ipscar", or "imntdar" |
correct.phylo |
Character. Either |
correct.trait.na |
Logical flag indicating whether |
correct.trait |
Character. Either |
Details
This functions check for the coincidence of species in the point pattern and in the phylogenetic or trait data and for the existence of missing data. If correct.phylo="mean"
, species which are absent in the phylogenetic tree or covariance matrix will be included and assigned mean phylogenetic covariance. If correct.phylo="exclude"
, missing species in the tree will be excluded from the analysis (i.e., will not be considered in the computation of the local phylogenetic indices). If correct.trait.na="TRUE"
, NA values for traits in the data.frame of traits will be assigned the mean trait value. If correct.trait="mean"
, missing species in the data.frame of traits will be included and assigned mean trait values. If correct.trait="exclude"
, missing species in the data.frame of traits will be excluded from the analysis (i.e., will not be considered in the computation of the local functional indices).
Value
checktree
returns a covariance matrix with the appropriate species corrections. checktraits
returns a data.frame of traits with the appropriate corrections or a Gower distance matrix among the species from the corrected data.frame of traits if idar="ifdar"
.
Warning
The transcription of species names in the multivariate mippp
, in the row names of the data.frame
of traits (or in the names or dimnames
of the distance matrices) should be identical. The same applies to the tiplabels
of the phylogenetic tree.
Author(s)
Marcelino de la Cruz marcelino.delacruz@urjc.es