disp_rate_demon: Demon dispersal rate

Description Usage Arguments Details Value Examples

View source: R/speedestimates.R

Description

A convenient wrapper for calculating dispersal rate using demon.cpp default parameter values

Usage

1
2
3
disp_rate_demon(K, r2, filled_grid = 0, migration_type = 0,
  migration_edge_only = 0, migration_rate_scales_with_K = 1,
  NumCells = NA)

Arguments

K

deme carrying capacity

r2

birth rate of migrating cells, relative to 1 (if filled_grid) or 0.9 (otherwise)

filled_grid

whether the model is of a filled grid or an expanding tumour

migration_type

0, 1, 2, 3 (see details)

migration_edge_only

whether migration occurs at the edge only

migration_rate_scales_with_K

whether to divide migration rate by sqrt(K)

NumCells

total population size (all demes); required only if migration_type = 2 or 3 and migration_edge_only = 0

Details

Meaning of migration_type:

If filled_grid = 1 then migration_type is set to 0.

Value

The growth rate of the radius, measured in cells (not demes).

Examples

1
2
3
4
5
6
7
# compare migration_edge_only = 0 versus migration_edge_only = 1:
sapply(0:1, disp_rate_demon, K = 32, r2 = 1/0.9, migration_type = 0)
sapply(0:1, disp_rate_demon, K = 32, r2 = 1/0.9, migration_type = 2, NumCells = 1e6)

# filled grid example:
sapply(1:4, disp_rate_demon, r2 = 1.1, filled_grid = 1)
sapply(1:4, disp_rate_demon, r2 = 1.1, filled_grid = 1, migration_rate_scales_with_K = 0)

robjohnnoble/demonanalysis documentation built on June 30, 2020, 12:47 a.m.