wflow_run {workflowr}R Documentation

Run the code

Description

wflow_run executes the code chunks of an R Markdown file in the current R session without affecting any of the website files. This is meant to be used while interactively developing an analysis. It does not change the working directory, isolate the computation from the current R session, nor set the seed of the random number generator. This is analogous to the RStudio option "Run all" to run all the code chunks. Use wflow_publish when you are ready to add the results to the website.

Usage

wflow_run(file = NULL, verbose = TRUE, project = ".")

Arguments

file

character (default: NULL). The R Markdown file to execute. Must have file extension Rmd or rmd. If NULL, the most recently modified Rmd file will be executed.

verbose

logical (default: TRUE). Should the lines of code (and their output) be echoed in the R console as they are executed? This argument is passed directly to the argument echo of the function source.

project

character (default: ".") By default the function assumes the current working directory is within the project. If this is not true, you'll need to provide the path to the project directory.

Value

Invisibly returns the path to the Rmd file that was executed

See Also

wflow_build with argument local = TRUE, source with argument echo = TRUE

Examples

## Not run: 

# Run the most recently modified Rmd file
wflow_run()
# Run a specific Rmd file
wflow_run("analysis/file.Rmd")

## End(Not run)


[Package workflowr version 1.7.1 Index]