genmap: Generate map

Description Usage Arguments Details Value Examples

View source: R/genmap.R

Description

Generate an epidmap object with population distributed into spatial units laid on a n-by-n regular squared lattice grid.

Usage

1
genmap(n = 5, p = c(10, 50), verbose = T)

Arguments

n

A positive integer. Grid dimension

p

A positive integer. People density for each tile - min/max - uniform distribution

verbose

A logical

Details

Map generation

For the map generation we considered a population distributed into spatial units laid on a n-by-n regular squared lattice grid. Each square of the grid contains a number of individuals randomly drawn from a uniform distribution ranging between the two values contained in the vector p. This geographical representation is very general in that the map thus generated can represent, e. g., a city divided into blocks or a region divided into smaller spatial union or any other meaningful geographical partition.

Value

An epidmap object

Examples

1
2
3
4
5
6
## Not run: 
set.seed(12345)
map <- genmap(n=5, p=c(10, 50))
print(map)

## End(Not run)

vincnardelli/epidsampler documentation built on Dec. 17, 2020, 6:25 p.m.