render2: A function to render and preview markdown documents.

Description Usage Arguments

View source: R/render2.R

Description

This function provides an alternative to the Knit button in RStudio, which tends to fail when working from a mapped disk. It is based on the render function but also provides a preview of the rendered document like Knit.

Usage

1
2
render2(input = rstudioapi::getSourceEditorContext()$path,
  replace = getOption("path.replace.list"), preview = TRUE, ...)

Arguments

input

The path of the input file to be rendered. Generally an R Markdown document (.Rmd). Defaults to the active file in the RStudio editor.

replace

A list of two strings. The first string will be replaced by the second one in the path. This can be used to solve issues when working from a mapped disk.

preview

Whether to preview the rendered documents.

...

Arguments to pass to render. For example, output_format="all" will render all formats defined within the file.


audrey-b/miscutils documentation built on Nov. 3, 2019, 2 p.m.