Checks consistency of names of species in spatial, phylogenetic and traits data.
checktree(tree, mippp, idar, correct.phylo)
checktraits(traits, mippp, idar, correct.trait.na, correct.trait)
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"
.
A phylogenetic tree in phylo
format (ape) or a phylogenetic covariance matrix
A data.frame of traits, or a distance matrix among species (in dist or matrix format) computed on a data.frame of traits.
A multitype (a.k.a. multivariate) marked point pattern . An object with the ppp format of spatstat, with the names of species as marks.
Character. The name of the idar fucntion to be computed. Either "isar", "ipsvar", "ipsrar", "ipsear", "ipscar", or "imntdar"
Character. Either "mean"
meaning "include missing species in the tree with a constant mean phylogenetic covariance" or "exclude"
, meaning "exclude missing species in the tree from the analysis"
Logical flag indicating whether NA
values in the matrix of traits should be "corrected": NA values will be assigned the mean trait value.
Character. Either "mean"
or "exclude"
. Species missing in the data.frame of traits will be assigned mean trait values or will be excluded from the analysis, respectively.
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.
Marcelino de la Cruz marcelino.delacruz@urjc.es
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).