Skip to contents

This method returns the current number of cells per species and that since the simulation began.

Value

A dataframe reporting mutant, epistate, counts, and overall for each species in the simulation.

Examples

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

# create a simulation
sim <- SpatialSimulation()
sim$add_mutant("A", growth_rate = 0.2, death_rate = 0.1)
sim$add_mutant("B", growth_rate = 0.15, death_rate = 0.05)
sim$schedule_mutation(src = "A", dst = "B", time = 50)
sim$place_cell("A", 500, 500)
sim$run_up_to_time(70)
#> 
 [████████████████████████████████████████] 100% [00m:00s] Saving snapshot                                        


# counts the number of cells per species
sim$get_counts()
#>   mutant epistate counts overall
#> 1      A             513    2719
#> 2      B               3       7