Description Usage Arguments Details Value Functions See Also
The returned function is compatible with the knit YAML front matter field
in R Markdown documents, which lets you customize the Knit button in RStudio.
| 1 2 3 4 5 | rmarkdown_renderer(...)
rmdmatter_renderer(...)
renaming_renderer(callback, ...)
 | 
| ... | Arguments passed to the underlying rendering function when the returned function is called. | 
| callback | A function that gets the rendered R Markdown YAML front
matter metadata as an argument, and returns a new name for  | 
Renderer functions are particularly useful in conjunction with the knit
metadata field to specify custom rendering options in RStudio. For example,
extending the example header in rmarkdown::rmd_metadata, you can easily
specify a fixed output file with rmarkdown_renderer():
| 1 2 3 4 5 6 | ---
title: "Crop Analysis Q3 2013"
author: Martha Smith
date: October 23rd, 2013
knit: rmdmatter::rmarkdown_renderer(output_file = "analysis-q3")
---
 | 
Or use renaming_renderer() to name the output dynamically using fields in
the front matter:
| 1 2 3 4 5 6 7 | ---
title: "Crop Analysis Q3 2013"
author: Martha Smith
date: October 23rd, 2013
knit: |
  rmdmatter::renaming_renderer(function(metadata) metadata$title)
---
 | 
A function that takes two arguments, input and encoding, and
renders the input R Markdown document when called.
rmarkdown_renderer: Vanilla R Markdown rendering.
rmdmatter_renderer: Retains the rendered YAML front matter.
renaming_renderer: Retains the rendered YAML front matter, and passes it to
callback to rename the output file.
rmarkdown::render() used by rmarkdown_renderer().
render() used by rmdmatter_renderer().
render_and_rename() used by renaming_renderer().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.