plot.seir: Plots for seir objects

Description Usage Arguments Value Examples

View source: R/plot.seir.r

Description

Plot the output of S, E, I, R for the specified time sequence

Usage

1
2
## S3 method for class 'seir'
plot(res)

Arguments

res

data.frame of results that were generated. Element can be found using $results

Value

A plot with specified settings

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Parameters and initial conditions.
parameters <- c(mu = 0.01, beta = 0.5,
                sigma = 1 / 14, gamma = 1 / 7)
initials <- c(S = 0.94, E = 0.01, I = 0.05, R = 0)

# Solve
seir_1 <- seir(pars = parameters, init = initials, time = 0:365)

# Plot
plot(seir_1$results)

NicolasPhysentzides/popdyn documentation built on Sept. 11, 2020, 2:26 p.m.