prepTraits: Prepare TreeCo Species Trait Table

View source: R/prepTraits.R

prepTraitsR Documentation

Prepare TreeCo Species Trait Table

Description

Clean trait records, get derived information and average the species trait information at family, genus, species and infraspecific levels.

Usage

prepTraits(
  trait.data = NULL,
  spp.name = "Name_submitted",
  tax.rank = "taxon.rank",
  trait.status = "status",
  trait.list = c(WSG = "wsg_gcm3", H = "MaxHeight_m", DBH = "MaxDbh_cm", MinLL =
    "MinLeafLength_cm", MinLW = "MinLeafWidth_cm", MaxLL = "MaxLeafLength_cm", MaxLW =
    "MaxLeafWidth_cm", LA = "LeafArea", SM = "SeedMass_g", EXT = "extinction", END =
    "endemism", LA = "LeafArea", LT = "LeafType", DS = "dispersal.syndrome", EG =
    "ecological.group"),
  rm.dead = TRUE,
  rm.indet = TRUE,
  rm.dup = TRUE
)

Arguments

trait.data

the data frame with the raw TreeCo trait table.

spp.name

character. The column name containing the species names. Defaults to "Name_submitted"

tax.rank

= "taxon.rank"

trait.status

character. The column name containing the entry status. Defaults to "status"

trait.list

a named vector with the column names of the traits should be included in the calculations.

rm.dead

logical. Should dead individuals be removed? Defaults to TRUE

rm.indet

logical. Should unidentified individuals be removed? Defaults to TRUE

rm.dup

logical. Should the duplicated or possibly duplicated entries (of wood density) be removed? Defaults to TRUE

Details

To be included

Value

a named list containing the edited and averaged trait data at the different taxonomic levels and the notes of the operations applied to obtain the new data frame.

Author(s)

Renato A. F. de Lima & Lucie Zinger


LimaRAF/TreeCo documentation built on Sept. 25, 2024, 12:41 p.m.