trait_impute: Impute traits

Description Usage Arguments Value

View source: R/trait_impute.R

Description

Impute traits

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
trait_impute(
  comm,
  traits,
  scale_hierarchy = c("Country", "Site", "BlockID", "PlotID"),
  global = TRUE,
  taxon_col = "taxon",
  trait_col = "trait",
  value_col = "Value",
  abundance_col = "Cover",
  other_col = character(0),
  keep_all = FALSE
)

Arguments

comm

community data in long format

traits

trait data in long format

scale_hierarchy

character vector of site/block/plot hierarchy (large to small)

global

logical; calculate traits at global scale. Must not be a column called global in the traits data.

taxon_col

character; name of taxon column in comm and traits

trait_col

character; name of trait name column in traits

value_col

character; name of trait value column in traits

abundance_col

character; name of species abundance column in comm

other_col

name of other grouping columns in comm

keep_all

logical; keep trait data at all available levels or just finest scale available

Value

a tibble with extra class imputed_trait


richardjtelford/traitstrap documentation built on Feb. 21, 2020, 11:17 a.m.