View source: R/cellMetrics_speciesRaster.R
cellMetrics_speciesRaster | R Documentation |
Calculate various morphological and phylogenetic community
metrics for every cell in a speciesRaster
object.
cellMetrics_speciesRaster(x, metric, var = NULL, nreps = 20, verbose = FALSE)
x |
object of class |
metric |
name of metric to use, see Details. |
var |
If a univariate morphological metric is specified, and the
data in |
nreps |
Number of repetitions for Foote metric distribution. |
verbose |
Intended primarily for debugging, prints progress to the console |
Univariate trait metrics
mean
median
range
mean_NN_dist: mean nearest neighbor distance
min_NN_dist: minimum nearest neighbor distance
variance
arithmeticWeightedMean (see below)
geometricWeightedMean (see below)
phylosignal: Blomberg's K for phylogenetic signal
Multivariate trait metrics
disparity
range
rangePCA
mean_NN_dist: mean nearest neighbor distance
min_NN_dist: minimum nearest neighbor distance
phylosignal: Blomberg's K for phylogenetic signal, as implemented in geomorph::physignal
Phylogenetic metrics
pd: Faith's phylogenetic diversity, including the root
meanPatristic
meanPatristicNN: mean nearest neighbor in patristic distance
minPatristicNN: minimum nearest neighbor in patristic distance
phyloDisparity: sum of squared deviations in patristic distance
PSV: Phylogenetic Species Variability
DR: non-parametric estimate of speciation rates
Range-weighted metrics
weightedEndemism
correctedWeightedEndemism: Weighted endemism standardized by species richness
phyloWeightedEndemism:
If data slot contains a pairwise matrix, var
is ignored.
Weighted mean options are available where, for each cell, a weighting scheme
(inverse of species range sizes) is applied such that small-ranged species are
up-weighted, and broadly distributed species are down-weighted.
This can be a useful way to lessen the influence of broadly distributed species
in the geographic mapping of trait data.
object of class speciesRaster
where the raster represents
calculations of the metric at every cell.
tamiasSpRas <- addPhylo_speciesRaster(tamiasSpRas, tamiasTree) tamiasSpRas <- addTraits_speciesRaster(tamiasSpRas, tamiasTraits) # univariate morphological example x <- cellMetrics_speciesRaster(tamiasSpRas, metric='mean', var='V2') plot(x) # multivariate morphological x <- cellMetrics_speciesRaster(tamiasSpRas, metric='disparity') plot(x) # phylogenetic metrics x <- cellMetrics_speciesRaster(tamiasSpRas, metric='meanPatristic') plot(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.