library(dplyr)
data(community)
data(trait)
# Filter community data to make example faster
community <- community |>
filter(
PlotID %in% c("A", "B"),
Site == 1
)
filled_traits <- trait_fill(
comm = community,
traits = trait,
scale_hierarchy = c("Site", "PlotID"),
taxon_col = "Taxon", value_col = "Value",
trait_col = "Trait", abundance_col = "Cover"
)
boot_traits <- trait_np_bootstrap(filled_traits,
nrep = 20,
sample_size = 200
)
Run the code above in your browser using DataLab