renderReport: Render RMarkdown Report

View source: R/sysargslist_utilities.R

renderReportR Documentation

Render RMarkdown Report

Description

Render the technical report file to the specified output format using pandoc.

Usage

renderReport(sysargs, fileName ="SPR_Report",
              rmd_title = "SPR workflow Template - Report",
              rmd_author = "Author",
              rmd_date= "Last update: `r format(Sys.time(), '%d %B, %Y')`",
              type = c("html_document"),
              desc = "This is a workflow template.",
              quiet = FALSE, open_file = TRUE)

Arguments

sysargs

object of class SYSargsList.

fileName

character string naming a file output. Default is "spr_report.Rmd".

rmd_title

string, title of the Rmd.

rmd_author

string, author(s) of the Rmd, put all authors in a single character string.

rmd_date

string, date header of Rmd.

type

The R Markdown output format to convert to. The option can be the name of a format (e.g. "pdf_document" or "html_document").

desc

string, or character vector of strings, some description text in format Rmarkdown that will be added to the document before the workflow steps start. It can be a single line or multiple lines by providing a character vector, each item is one line.

quiet

If set to TRUE, all messages returned by the function will be suppressed.

open_file

Default is TRUE.

Value

It will return an SYSargsList updated, with the file path location.

Author(s)

Daniela Cassol

See Also

See also as SYSargsList-class.

Examples

sal <- SPRproject(overwrite = TRUE)
file_path <- system.file("extdata", "spr_simple_wf.Rmd", package = "systemPipeR")
sal <- importWF(sal, file_path = file_path, verbose = FALSE)
targetspath <- system.file("extdata/cwl/example/targets_example.txt", package = "systemPipeR")
appendStep(sal) <- SYSargsList(step_name = "echo", 
                              targets = targetspath, dir = TRUE,
                              wf_file = "example/workflow_example.cwl", input_file = "example/example.yml", 
                              dir_path = system.file("extdata/cwl", package = "systemPipeR"),
                              inputvars = c(Message = "_STRING_", SampleName = "_SAMPLE_"))
sal <- renderReport(sal, open_file = FALSE)

tgirke/systemPipeR documentation built on Aug. 30, 2022, 10 p.m.