Skip to contents

This method updates the rates of a species.

Arguments

species

The species whose rates must be updated.

rates

The list of rates to be updated.

Examples

# set the seed of the random number generator
set.seed(0)

# create a simulation
sim <- SpatialSimulation()
sim$add_mutant(name = "A",
               epigenetic_rates = c("+-" = 0.01, "-+" = 0.01),
               growth_rates = c("+" = 0.2, "-" = 0.08),
               death_rates = c("+" = 0.1, "-" = 0.01))

# Set the death and epigenetic switch rates of "A-" to 0
sim$update_rates("A-", c(switch=0, death=0))