cellMetrics_speciesRaster: Cell Metrics

View source: R/cellMetrics_speciesRaster.R

cellMetrics_speciesRasterR Documentation

Cell Metrics

Description

Calculate various morphological and phylogenetic community metrics for every cell in a speciesRaster object.

Usage

cellMetrics_speciesRaster(x, metric, var = NULL, nreps = 20, verbose = FALSE)

Arguments

x

object of class speciesRaster

metric

name of metric to use, see Details.

var

If a univariate morphological metric is specified, and the data in x are multivariate, which trait should be used? This can also specify which subset of columns a multivariate metric should be applied to.

nreps

Number of repetitions for Foote metric distribution.

verbose

Intended primarily for debugging, prints progress to the console

Details

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.

Value

object of class speciesRaster where the raster represents calculations of the metric at every cell.

Examples

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)


ptitle/speciesRaster documentation built on June 11, 2022, 1:35 a.m.