params <- newMultispeciesParams(NS_species_params)
#### Setting allometric encounter rate #######################
# Set coefficient for each species. Here we choose 0.1 for each species
encounter_pre <- rep(0.1, nrow(species_params(params)))
# Multiply by power of size with exponent, here chosen to be 3/4
# The outer() function makes it an array species x size
allo_encounter <- outer(encounter_pre, w(params)^(3/4))
# Change the external encounter rate in the params object
ext_encounter(params) <- allo_encounter
Run the code above in your browser using DataLab