renderLogs.Rd
Render the logs report file to the specified output format using pandoc.
renderLogs(sysargs, type = c("html_document", "pdf_document"),
fileName = "default", quiet = FALSE,
open_file = TRUE)
object of class SYSargsList
.
The R Markdown output format to convert to. The option
can be the name of a format (e.g. "pdf_document"
or "html_document"
).
character string naming a file output. Default is "logs_<date>.Rmd"
.
If set to TRUE
, all messages returned by the function will be suppressed.
Default is TRUE
.
It will return an SYSargsList
updated.
See also as SYSargsList-class
.
## Construct SYSargsList object from Rmd file
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'
targetspath <- system.file("extdata/cwl/example/targets_example.txt", package="systemPipeR")
## Constructor and `appendStep<-`
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_"))
appendStep(sal) <- LineWise(code = {
hello <- lapply(getColumn(sal, step=1, 'outfiles'), function(x) yaml::read_yaml(x))
},
step_name = "R_read",
dependency = "echo")
sal <- runWF(sal)
#> Running Step: echo
#> Running Session: Management
#>
|
| | 0%
|
|======================= | 33%
|
|=============================================== | 67%
|
|======================================================================| 100%
#> ---- Summary ----
#> Targets Total_Files Existing_Files Missing_Files echo
#> M1 M1 1 1 0 Success
#> M2 M2 1 1 0 Success
#> M3 M3 1 1 0 Success
#>
#> Step Status: Success
#> Running Step: R_read
#> Running Session: Management
#>
|
| | 0%
|
|======================================================================| 100%
#> Step Status: Success
#>
sal <- renderLogs(sal, open_file = FALSE)
#>
#> Attaching package: ‘BiocStyle’
#> The following object is masked from ‘package:systemPipeR’:
#>
#> output
#> Written content of 'Report' to file:
#> logs_May112023_0153.html