rarefy_FPD: Rarefied Function-Phylogenetic Distances

Description Usage Arguments Value Author(s)

View source: R/Rarefy_FPD.R

Description

rare_FPD resamples a phylogenetic and functional distance matrix a set number of times so that communities of different sizes can be compared to each other.

Usage

1
2
3
rarefy_FPD(focal.species, phylo.mat, fun.mat, metric = c("MPD", "NND"),
  n.resamp = 1000, n.rare, a, p, abundance.weighted = FALSE,
  community.data = NULL)

Arguments

focal.species

The name of the focal species in the community to be rarefied.

phylo.mat, fun.mat

A phylogenetic or functional distance matrix with species names as row names and column names. Can either be a data frame, matrix, or dist.

metric

Either MPD (MPD) or nearest neighbor distance (NND). The default is to calculate both metrics.

n.resamp

The number of rarefied resamplings to perform. Default is 1000.

n.rare

The number of species to rarefy the community down to. Must be less than the total in the community.

a

The phylogenetic scaling factor for the calculation of functional-phylogenetic distances

p

The power to raise each distance value to in the functional- phylogenetic distance calculation

abundance.weighted

A logical value indicating whether or not to weight species by their relative abundances

community.data

The community data file. Each observation of a species in a community should be its own row. For now, the column specifiy which community is which is called exotic_species, but this will be generalized later using an argument to specifiy which column marks community separators and which column holds the actual species names

Value

A list with 4 components

Author(s)

Sam Levin


levisc8/Fun_Phylo_Package documentation built on June 2, 2020, 8:41 a.m.