gen_rounded_abundances: Generate rounded abundances

gen_rounded_abundancesR Documentation

Generate rounded abundances

Description

Function to generate a sampled lognormal distribution whose values are rounded to produce a vector of counts of the number of PUs that each species will occupy.

Usage

gen_rounded_abundances(
  tot_num_spp_after_wrapping,
  meanlog,
  sdlog,
  add_one_to_abundances,
  plot_rounded_abundances = FALSE
)

Arguments

tot_num_spp_after_wrapping

integer

meanlog

numeric

sdlog

numeric

add_one_to_abundances

boolean

plot_rounded_abundances

boolean

Details

No zero counts are allowed, so any species that was assigned a 0 count in the lognormal generation is removed from the returned vector. This means that the number of species returned may be less than the value of tot_num_spp_after_wrapping specified in the inputs.

Value

Returns a vector with one count for each species


langfob/bdpg documentation built on Dec. 8, 2022, 5:33 a.m.