runEpiSDReport {EpiSignalDetection}R Documentation

Run the EpiSignalDetection report (HTML markdown)

Description

Function to render the markdown report of alarms in HTML format for ECDC Signal Detection Report

Usage

runEpiSDReport(input, stratified, outputfile, run_pandoc = TRUE)

Arguments

input

list of parameters as defined in the Signal Detection Application (see runEpiSDApp)

(i.e. list(disease, country, indicator, stratification, unit, daterange, algo, testingperiod))

(see also default parameters in system.file("SignalDetectionReport_HTML", "SignalDetectionReport.Rmd", package = "EpiSignalDetection"))

stratified

a logical value indicating whether the report should be stratified by Population variable or not (default FALSE)

outputfile

output file name (e.g. 'C:/R/report.html')

(default value is a temporary folder - file.path(tempdir(), "SignalDectectionReport.html"))

run_pandoc

An option for whether to run pandoc to convert Markdown output.

Details

Datasets to use in the report:

Value

An HTML report. When run_pandoc = TRUE, the compiled document is written into the output file, and the path of the output file is returned. When run_pandoc = FALSE, the path of the Markdown output file, with attributes knit_meta (the knitr meta data collected from code chunks) and intermediates (the intermediate files/directories generated by render())

See Also

Default dataset used in the report SignalData

Signal Detection Application runEpiSDApp

Examples

## Not run: 
#-- Running the report as a standalone function
runEpiSDReport()    #Definition of each input parameter
                     #is done one by one through the R console

#---> OR

#-- First setting the parameters to run the report for
input <- list(
disease = "Salmonellosis",
country = "Portugal",
indicator = "Reported cases",
stratification = "Confirmed cases",
unit = "Month",
daterange = c("2011-01-01", "2016-12-31"),
algo = "FarringtonFlexible",
testingperiod = 6
)

#-- Second running the report based on the EpiSignalDetection::SignalData dataset
#-- and store it in a temporary folder
runEpiSDReport(input = input)

#-- Running the report based on the EpiSignalDetection::SignalData dataset
#-- and store the HTML output 'test.html' in the folder 'C:/R/'
runEpiSDReport(input = input, outputfile = "C:/R/test.html")

#-- Running the report based on external data
input <- list(
file = list(datapath = "C:/Users/Downloads/ECDC_surveillance_data_Pertussis.csv"),
disease = "Pertussis",
country = "Greece",
indicator = "Reported cases",
stratification = "All cases",
unit = "Month",
daterange = c("2011-12-01", "2016-12-01"),
algo = "FarringtonFlexible",
testingperiod = 3
)

runEpiSDReport(input = input, stratified = TRUE)

## End(Not run)



[Package EpiSignalDetection version 0.1.2 Index]