Skip to contents

This method return the rates of a species.

Arguments

species

The species whose rates are aimed.

Value

The list of the species rates.

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.02),
               growth_rates = c("+" = 0.2, "-" = 0.08),
               death_rates = c("+" = 0.1, "-" = 0.01))

# Get the rates of "A-". In this case c("growth"=0.08, "death"=0.01,
# "switch"=0.02) is expected
sim$get_rates("A-")
#> $growth
#> [1] 0.08
#> 
#> $death
#> [1] 0.01
#> 
#> $switch
#> [1] 0.02
#>