sal2rmd.Rd
This function takes a SYSargsList object and translate it to SPR workflow template Rmarkdown format.
sal2rmd(sal, out_path = "spr_template.Rmd", rmd_title = "SPR workflow template",
rmd_author = "my name",
rmd_date = "Last update: `r format(Sys.time(), '%d %B, %Y')`",
rmd_output = "html_document",
desc = "This is a workflow template.", verbose = TRUE)
SYSargsList
object.
string, output file name.
string, title of the Rmd.
string, author(s) of the Rmd, put all authors in a single character string.
string, date header of Rmd.
string, output format of Rmd, used in header.
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.
logical. If TRUE
will show you more information as
the function runs.
no return
file_path <- system.file("extdata/spr_simple_wf.Rmd", package="systemPipeR")
sal <- SPRproject(overwrite = TRUE)
#> Recreating directory '/home/runner/work/systemPipeR/systemPipeR/docs/reference/.SPRproject'
#> Creating file '/home/runner/work/systemPipeR/systemPipeR/docs/reference/.SPRproject/SYSargsList.yml'
sal <- importWF(sal, file_path)
#> Reading Rmd file
#>
#>
#> ---- Actions ----
#> Checking chunk eval values
#> Checking chunk SPR option
#> Ignore non-SPR chunks: 17
#> Parse chunk code
#> Checking preprocess code for each step
#> No preprocessing code for SPR steps found
#> Now importing step 'load_library'
#> Now importing step 'export_iris'
#> Now importing step 'gzip'
#> Now importing step 'gunzip'
#> Now importing step 'stats'
#> Now back up current Rmd file as template for `renderReport`
#> Template for renderReport is stored at
#> /home/runner/work/systemPipeR/systemPipeR/docs/reference/.SPRproject/workflow_template.Rmd
#> Edit this file manually is not recommended
#> Now check if required tools are installed
#> Check if they are in path:
#> Checking path for gzip
#> PASS
#> Checking path for gunzip
#> PASS
#> step_name tool in_path
#> 1 gzip gzip TRUE
#> 2 gunzip gunzip TRUE
#> All required tools in PATH, skip module check. If you want to check modules use `listCmdModules`Import done
#>
sal2rmd(sal)
#> sal2rmd starts, pre-checks...
#> Open spr_template.Rmd to write
#> Write Rmd header and description
#> Now writing step 1 load_library
#> Now writing step 2 export_iris
#> Now writing step 3 gzip
#> Now writing step 4 gunzip
#> Now writing step 5 stats
#> Success! File created at spr_template.Rmd