runEpiSDReport: Run the EpiSignalDetection report (HTML markdown)

Description Usage Arguments Details Value See Also Examples

View source: R/runEpiSDReport.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## 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)

EpiSignalDetection documentation built on Dec. 11, 2021, 9:27 a.m.