plot.state: Plots a map of a given model compartment state

Description Usage Arguments Examples

View source: R/PlotState.R

Description

Takes a vector or matrix of a model state, e.g. S, I or R, and plots it back on the original supplied population map

Usage

1
plot.state(state, examras, unipix, main = NULL)

Arguments

state

Matrix or vector of a model state, e.g. S, I or R

examras

Population raster used to determin the landscape, e.g. sgpop

unipix

Universal pixel lookup table, see ?make.unipix

main

Optional character title

Examples

1
2
3
4
5
6
7
8
9
data(sgdat)
data(sgpop)
sgpop <- pop.process(sgpop, agg = 10)
unipix <- make.unipix(sgpop)
sgdat <- data.frame(sgdat, patchID = apply(cbind(sgdat[, 3:2]), 1, pix.id.find, unipix))
sero <- c(0.577, 0.659, 0.814)
startweek <- 40
stim <- stim.generate(sgdat, sero, startweek, sgpop, unipix)
plot.state(stim)

obrady/SpatialDengue documentation built on Nov. 27, 2020, 12:13 p.m.