surveillance (version 1.12.1)

toLatex.sts: toLatex-Method for "sts" Objects

Description

Convert "sts" objects to a character vector with LaTeX markup.

Usage

## S3 method for class 'sts':
toLatex(object, caption = "",label=" ", columnLabels = NULL,
                        subset = NULL, 
                        alarmPrefix = "\\\\textbf{\\\\textcolor{red}{",
                        alarmSuffix = "}}", ubColumnLabel = "UB", ...)

Arguments

object
an "sts" object.
caption
A caption for the table. Default is the empty string.
label
A label for the table. Default is the empty string.
columnLabels
A list of labels for each column of the resulting table. Default is NULL
subset
A range of values which should be displayed. If Null, then all data in the sts objects will be displayed. Else only a subset of data. Therefore range needs to be a numerical vector of indexes from 1 to length(@observed).
alarmPrefix
A latex compatible prefix string wrapped around a table cell iff there is an alarm;i.e. alarm = TRUE
alarmSuffix
A latex compatible suffix string wrapped around a table cell iff there is an alarm;i.e. alarm[i,j] = TRUE
ubColumnLabel
The label of the upper bound column; default is "UB".
...
further arguments passed to print.xtable.

Value

encoding

latin1

Examples

Run this code
# Create a test object
  data("salmonella.agona")
  
  # Create the corresponding sts object from the old disProg object
  salm <- disProg2sts(salmonella.agona)
  
  control <- list(range=(260:312),
                   noPeriods=1,populationOffset=FALSE,
                   fitFun="algo.farrington.fitGLM.flexible",
                   b=4,w=3,weightsThreshold=1,
                   pastWeeksNotIncluded=3,
                   pThresholdTrend=0.05,trend=TRUE,
                   thresholdMethod="delta",alpha=0.1)
  salm <- farringtonFlexible(salm,control=control)
  print(toLatex(salm))

Run the code above in your browser using DataCamp Workspace