b_knit: Use 'knitr' within a stage.

Description Usage Arguments Details See Also Examples

View source: R/pages.R

Description

This returns a function which can be passed as the page argument to a Stage object. When the page is shown knit will be called on filename. The variables id, period, params and error will be available within the knitr file. params is a named list of HTML parameters. error is a character vector of errors, e.g. from a form submission. Typically it will be character(0).

Usage

1
b_knit(filename)

Arguments

filename

Path of the file to knit

Details

By default the following options are set: echo=FALSE, cache=FALSE, warning=FALSE, message=FALSE for opts_chunk; and out.format="html", progress=FALSE, upload.fun = image_uri for opts_knit. The last option means that images will be shown encoded as "data URIs" in the document itself.

See Also

Other page creation: b_brew

Examples

1
2
3
4
## Not run: 
text_stage(page=b_knit("myknitfile.Rhtml"))

## End(Not run)

hughjonesd/betr documentation built on May 17, 2019, 9:11 p.m.