Skip to contents

This method places a cell in the tissue.

Arguments

species

The name of the new cell species.

x

The position on the x axis of the cell.

y

The position on the y axis of the cell.

Examples

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

# create a tissue 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))

# add into the tissue a cell of species "A+" in position (500,500)
sim$place_cell("A+", 500, 500)