Draws body mass measurements for a population of birds (of all the same species) given the population size and either (1) the species AOU or (2) the mean and potentially standard deviation of body mass for that species.
Usage
pop_generate(
abundance = NA_integer_,
AOU = NA_integer_,
scientific_name = NA_character_,
mean_size = NA_real_,
sd_size = NA_real_,
sim_species_id = 1
)
Arguments
- abundance
integer number of individuals to draw. Required.
- AOU
the numeric AOU code used for this species in the Breeding Bird Survey
- scientific_name
as "Genus species"
- mean_size
numeric, mean body mass (in grams) for this species.
- sd_size
numeric, standard deviation of body mass for this species.
- sim_species_id
defaults AOU or 1
Value
a dataframe with abundance
rows - one record per individual - and
columns for species attributes.
Specifically:
AOU
: the AOU, if providedsim_species_id
: thesim_species_id
if providedscientific_name
: the scientific name if providedindividual_mass
: the simulated body mass (in grams) for this individualindividual_bmr
: the simulated basal metabolic rate for this individualmean_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
Examples
pop_generate(abundance = 5, AOU = 2881)
#> AOU sim_species_id individual_mass individual_bmr mean_size sd_size
#> 1 2881 2881 443.0807 809.3410 405.5 31
#> 2 2881 2881 366.7129 707.2189 405.5 31
#> 3 2881 2881 417.9082 776.2829 405.5 31
#> 4 2881 2881 434.4759 798.1029 405.5 31
#> 5 2881 2881 390.8472 740.0999 405.5 31
#> abundance sd_method scientific_name
#> 1 5 AOU lookup Perdix perdix
#> 2 5 AOU lookup Perdix perdix
#> 3 5 AOU lookup Perdix perdix
#> 4 5 AOU lookup Perdix perdix
#> 5 5 AOU lookup Perdix perdix
pop_generate(abundance = 5, scientific_name = "Selasphorus calliope")
#> AOU sim_species_id individual_mass individual_bmr mean_size sd_size
#> 1 4360 4360 2.937854 22.64096 2.65 0.1818394
#> 2 4360 4360 2.758695 21.64767 2.65 0.1818394
#> 3 4360 4360 2.734753 21.51354 2.65 0.1818394
#> 4 4360 4360 2.514645 20.26418 2.65 0.1818394
#> 5 4360 4360 2.824394 22.01400 2.65 0.1818394
#> abundance sd_method scientific_name
#> 1 5 Scientific name lookup Selasphorus calliope
#> 2 5 Scientific name lookup Selasphorus calliope
#> 3 5 Scientific name lookup Selasphorus calliope
#> 4 5 Scientific name lookup Selasphorus calliope
#> 5 5 Scientific name lookup Selasphorus calliope
pop_generate(abundance = 5, mean_size = 20, sd_size = 3)
#> AOU sim_species_id individual_mass individual_bmr mean_size sd_size abundance
#> 1 NA 1 20.45791 90.33029 20 3 5
#> 2 NA 1 17.69189 81.44274 20 3 5
#> 3 NA 1 24.17924 101.76160 20 3 5
#> 4 NA 1 22.75601 97.45380 20 3 5
#> 5 NA 1 23.04826 98.34455 20 3 5
#> sd_method scientific_name
#> 1 Mean and SD provided <NA>
#> 2 Mean and SD provided <NA>
#> 3 Mean and SD provided <NA>
#> 4 Mean and SD provided <NA>
#> 5 Mean and SD provided <NA>