plot.survRes: Plot a 'survRes' object

View source: R/plot.survRes.R

plot.survResR Documentation

Plot a survRes object

Description

Plotting a (multivariate) survRes object (soft-deprecated), including the number of infected, the threshold for recognizing an outbreak, the alarm status and the outbreak status.

As of surveillance 1.20.0, legacy survRes objects are plotted via internal disProg2sts conversion and stsplot_time.

Usage

  ## S3 method for class 'survRes'
plot(x, method = x$control$name, disease = x$control$data,
     xaxis.years = TRUE, startyear = 2001, firstweek = 1,
     same.scale = TRUE, ...,
     main = paste0("Analysis of ", disease, " using ", method))

Arguments

x

object of class survRes

method

surveillance method to be used in title

disease

name of disease in title

xaxis.years

Boolean indicating whether to show a year-based x-axis

startyear, firstweek

(legacy arguments, ignored with a warning)

same.scale

if TRUE (default), all plots use the same ylim

...

further arguments passed to stsplot_time

main

the plot title is generated from the method and disease arguments if not specified otherwise

Examples

data(ha)
ctrl <- list(range = 209:290, b = 2, w = 6, alpha = 0.005)
plot(algo.bayes(aggregate(ha), control = ctrl))

surveillance documentation built on Oct. 2, 2024, 1:08 a.m.