In the absence of a _projthis.yml file, this renders each of the .Rmd files in the workflow in alphabetical order, with README.Rmd last. This order is important because it preserves the direction of the data dependencies.

proj_workflow_render(
  path_proj = "workflow",
  output_options = list(html_preview = FALSE),
  ...
)

Arguments

path_proj

character path to workflow directory, relative to the project directory.

output_options

list of output options that can override the RMarkdown file metadata. The default sets html_preview = FALSE to avoid HTML files being created for github_document.

...

other arguments passed on to rmarkdown::render().

Value

Invisible NULL, called for side effects.

Details

A _projthis.yml file might look something like this:

render:
  first:
    00-import.Rmd
  last:
    99-publish.Rmd

If the workflow directory has a _projthis.yml file:

  • Entries in render$first are rendered first.

  • Entries in render$last are rendered last, but README.Rmd is rendered very last.

  • If README.Rmd is specified in render$first or render$last, it is rendered there rather than very last.

  • All unspecified files are rendered in alphabetical order after first, and before last.

Each .Rmd file is rendered in its own R session, using proj_rmd_render().

Examples

if (FALSE) {
  # not run because it creates side effects
  proj_workflow_render()
}