kl.mpd: KL-Weighted MPD (klMPD)

kl.mpdR Documentation

KL-Weighted MPD (klMPD)

Description

KL-weighted version of the mean pairwise phylogenetic distance (klMPD). This is a metric of phylogenetic diversity that is corrected for partner availability in the case of interaction networks, and species regional availability in the case of community data matrices (CDM).

Usage

kl.mpd(samp, dis, q)

Arguments

samp

Required. A matrix or dataframe with focal taxa (interaction networks) or sites/communities (CDM) as rows, and partner taxa as columns. Elements of the matrix are interaction frequencies (for interaction matrices), or site-specific species abundances (CDM)

dis

Required. A symmetric matrix with the phylogentic distances among the taxa in the columns of samp. If you have a phylogenetic tree, you can generate this with cophenetic(your.tree). All taxa in the columns should be part of the matrix, but the matrix may have taxa not included in samp.

q

Optional. A named numerical vector with the relative availabilities (i.e., sum(q) = 1) of the taxa in the columns of samp. Default is to estimate these values from interaction frequencies or relative species abundances summed across the matrix.

Value

A named numerical vector with the klMPD estimated for each taxon or community/site in the rows of samp.

Author(s)

Carlos J. Pardo De la Hoz


cjpardodelahoz/pss documentation built on Nov. 21, 2022, 11:10 p.m.