make_local_trait_dist: Make a functional trait distance matrix

Description Usage Arguments Value Note Author(s) See Also

View source: R/Local_fun_dist.R

Description

Creates a Gower distance matrix using the method of Pavoine et al 2009 to handle many types of data

Usage

1
2
make_local_trait_dist(focal.species, community.data, trait.data, traits,
  scale)

Arguments

focal.species

The focal species or plot identifier that you want to use to create a the phylogeny

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

trait.data

A data frame that contains trait data information. Currently, this only supports names from Levin et al 2017, but will hopefully soon be generalized to include all trait names listed in TRY (Kattge et al 2017).

traits

A character vector of trait names that should match the names in trait.data. An effect method of subsetting this is to simply call names(trait.data)[first.trait:last.trait]

scale

The spatial scale at which to analyze the data

Value

An object of class dist.

Note

These can easily be coerced to other data structures, but must be coerced to a matrix first.

Author(s)

Sam Levin

See Also

make_regional_trait_dist, make_local_trait_ktab


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