importWF {systemPipeR} | R Documentation

## Import R Markdown file as workflow

### Description

Import R Markdown file as workflow. Each R code chunk will be set as a step in the workflow. This operation requires a few extra settings on the R Markdown chunk options, to include a particular code chunk in the workflow analysis. Please check `Details`.

### Usage

    importWF(sysargs, file_path, ignore_eval = TRUE, verbose = TRUE)

### Arguments

`sysargs` | `SYSargsList` empty object. More information on `Details`.
`file_path` | string, file path of the workflow file.
`ignore_eval` | logical, treat all R chunks' `eval` option as `TRUE` in workflow `Rmd` file even if some chunks have `eval=FALSE`.
`verbose` | logical, print out verbose message while function running.

### Details

To include a particular code chunk from the R Markdown file in the workflow analysis, please use the following code chunk options:

- `spr = 'r'`: for code chunks with R code lines; - `spr = 'sysargs'`: for code chunks with an 'SYSargsList' object; - `spr.dep = <StepName>`: for specify the previous dependency. If this options is not found, it will automaticly add the previous step.

For `spr = 'sysargs'`, the last object assigned needs to be the `SYSargsList`. If the `spr` flag is not found, the R chunk will not be included in the workflow.

It is required to start a project using `SPRproject()` function, and use the object to populate the steps from R Markdown file.

### Value

`importWF` will return an `SYSargsList` object.

### Author(s)

Le Zhang and Daniela Cassol

### See Also

`SYSargsList`

### Examples

    file_path <- system.file("extdata/spr_simple_lw.Rmd", package="systemPipeR")
    sal <- SPRproject(overwrite = TRUE)
    sal <- importWF(sal, file_path)

[Package systemPipeR version 2.0.8 Index]