Learn R Programming

surveillance (version 1.23.1)

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

Description

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

Usage

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

Value

An object of class "Latex".

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.

Author

Dirk Schumacher

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)

toLatex(salm, sanitize.text.function=identity, comment=FALSE)

Run the code above in your browser using DataLab