Skip to contents

This method returns the number of cells per species along the tumour simulation.

Value

A dataframe reporting mutant, epistate, counts 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
#> 1      A             513
#> 2      B               3