knitAPS: Render an AnalysisPageServer Rmd report to HTML using knitr

Description Usage Arguments Value Author(s)

View source: R/knitr.R

Description

This doesn't do much more than just call knitr, but it first has a bit of logic to overwrite or not the target directory. AnalysisPageServer reports are entire directories, so this is convenient to manage the creation of the report at that level.

Usage

1
2
3
knitAPS(template.Rmd, outdir = dirname(outfile), outfile = file.path(outdir,
  sub(".Rmd", ".html", basename(template.Rmd))), e = new.env(),
  overwrite = FALSE, ...)

Arguments

template.Rmd

Path to .Rmd template

outdir

Path to output directory. Default: dirname(outfile). You must specify either this or outfile.

outfile

Path to output main .html file. Default is to use basename(template.Rmd) with an .html extension, and put it in the outdir directory. You must specify either outdir or this.

e

Environment to pass to knitr. Default: new.env()

overwrite

Logical, default FALSE. This controls the behavior If outdir already exists. In that case, if overwrite is TRUE then the outdir is first removed. If overwrite is FALSE then instead an error is thrown.

...

Passed through to knit2html()

Value

Path to filename written (that is, outfile).

Author(s)

Brad Friedman


AnalysisPageServer documentation built on April 28, 2020, 6:32 p.m.