community_generate: Simulate individual measurements for many populations

View source: R/community_generate.R

community_generateR Documentation

Simulate individual measurements for many populations

Description

For a community (i.e. a collection of populations of different species, or of the same species at different points in time or locations, etc), simulate individual-level size and metabolic rate measurements.

Usage

community_generate(
  community_data_table,
  abundance_column_name = "speciestotal"
)

Arguments

community_data_table

dataframe containing at least one of AOU, scientific_name, or mean_size and a column for species abundances

abundance_column_name

character, the name of the column with species abundances. Defaults to "speciestotal".

Value

a dataframe one row per individual, all columns from community_data_table, and additional columns for species attributes.

Specifically:

  • AOU: the AOU, if provided

  • sim_species_id: the sim_species_id if provided

  • genus: the genus associated with the AOU if provided, or the genus if provided

  • species: the species associated with the AOU if provided, or the species if provided

  • individual_mass: the simulated body mass (in grams) for this individual

  • individual_bmr: the simulated basal metabolic rate for this individual

  • mean_size: the mean body mass for this species (i.e. the parameter used for simulation)

  • sd_size: the standard deviation of body mass for this species (i.e. the parameter used for simulation)

  • abundance: the number of individuals simulated of this species (i.e. parameter used for simulation)

  • sd_method: the method for finding the standard deviation for body mass for this species

  • scientific_name: the scientific name

Examples


demo_community <- community_generate(demo_route_clean)
head(demo_community)

diazrenata/birdsize documentation built on Jan. 29, 2024, 12:25 p.m.