# NOT RUN {
params <- newMultispeciesParams(NS_species_params)
#### Setting allometric death rate #######################
# Set coefficient for each species. Here we choose 0.1 for each species
z0pre <- rep(0.1, nrow(species_params(params)))
# Multiply by power of size with exponent, here chosen to be -1/4
# The outer() function makes it an array species x size
z0 <- outer(z0pre, w(params)^(-1/4))
# Change the external mortality rate in the params object
params <- setExtMort(params, z0 = z0)
# }
Run the code above in your browser using DataLab