evalCode {systemPipeR} | R Documentation

## Toggles option `eval` on the RMarkdown files

### Description

Function to evaluate (`eval=TRUE`) or not evaluate (`eval=FALSE`) R chunk codes in the Rmarkdown file. This function does not run the code, just toggles between `TRUE` or `FALSE` the option `eval` and writes out a new file with the chosen option.

### Usage

    evalCode(infile, eval = TRUE, output)

### Arguments

`infile` | name and path of the infile file, format `Rmd`.
`eval` | whether to evaluate the code and include its results. The default is `TRUE`.
`output` | name and path of the output file. File format `Rmd`.

### Value

Writes Rmarkdown file containing the exact copy of the `infile` file with the option choose on the `eval` argument. It will be easy to toggle between run all the R chunk codes or not.

### Author(s)

Daniela Cassol

### Examples

    ## Not run:
    library(systemPipeRdata)
    file <- system.file("extdata/workflows/rnaseq", "systemPipeRNAseq.Rmd", package="systemPipeRdata")
    evalCode(infile=file, eval=FALSE, output="test.Rmd")

    ## End(Not run)

[Package systemPipeR version 1.22.0 Index]