Skip to contents

This method returns a dataframe reporting the current number of simulated events per species.

Value

A dataframe reporting event, mutant, epistate, and fired for each event type, mutant, and epigenetic states.

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))
sim$place_cell("A+", 500, 500)
sim$run_up_to_event("switch", "A+", 100)
#> 
 [████████████████████████████████████████] 100% [00m:00s] Saving snapshot                                        


# get the number of event fired per event and species
sim$get_firings()
#>    event mutant epistate fired
#> 1  death      A        -   168
#> 2 growth      A        -   905
#> 3 switch      A        -   106
#> 4  death      A        +  1539
#> 5 growth      A        +  2202
#> 6 switch      A        +   100