Using specified parameters this function run the simulation

multigen(
  traits,
  trait_weights,
  env,
  time,
  species,
  patches,
  composition,
  A = A,
  B = B,
  d,
  k,
  width,
  H,
  h_fun = "+",
  di_thresh = 24,
  lim_sim_exponent = 2,
  hierar_exponent = 0.5
)

Arguments

traits

a species-traits data.frame with species as rownames and traits as numeric columns with names matching trait_weights column trait

trait_weights

data.frame with at least three columns equal to trait (giving the name of the concerned traits in traits df), growth_weight the relative weight of the trait in growth and compet_weight the relative weight of the trait in competition.

env

a vector of environmental values

time

an integer giving the total number of generations

species

an integer giving the total number of species to simulate

patches

an integer giving the total number of patches to simulate

composition

the actual array containing species abundances per site over time, giving the initial populations of each species

A

the scalar of inter-specific competition coefficient (see bevHoltFct())

B

the scalar for intra-specific competition coefficient by default B = A

d

a numeric value between 0 and 1 giving the percentage of dispersal occurring across all patches

k

a scalar giving the maximum growth rate in optimal environment

width

a numeric giving niche breadth of all species

H

a numeric for hierarchical competition such as H/k <= 1

h_fun

a function that describes how hierarchical is combined to environmental-based growth (default: sum())

di_thresh

dissimilary threshold above which species are considered maximally dissimilar

lim_sim_exponent

exponent to use for limiting similarity distances

hierar_exponent

exponent to use for hierarchical compet. distances