Learn R Programming

surveillance (version 1.5-4)

sts-class: Class "sts" -- surveillance time series

Description

This is a leightweight S4 class to implement multivariate time series of counts used for public health surveillance data. The class captures the time series data as well as the spatial layout of the regions, where the data originate from.

Arguments

encoding

latin1

Examples

Run this code
if (require("maptools")) {
    # load disProg-object "ha" and convert to S4-class "sts"
    data("ha")
    shp <- system.file("shapes/berlin.shp",package="surveillance")
    ha.sts <- disProg2sts(ha, map=maptools::readShapePoly(shp,IDvar="SNAME"))
  } else {
    # load pre-built sts-object
    data("ha.sts")
    # the only difference is that here German umlauts have been removed from
    # 'ha.sts@map@data$BEZIRK' for compatibility reasons
  }
  
  plot(ha.sts, type=observed ~ 1 | unit)

Run the code above in your browser using DataLab