build_snippet: Knit a single .Rmd snippet

Description Usage Arguments Details

Description

Knit a .Rmd snippet into a .md file. A snippet is like a "mini-vignette"

Usage

1
build_snippet(input, output, base_url = "/", category = NULL, fig.path, ...)

Arguments

input

a .Rmd file to compile

output

the .md file to write

base_url

base_url of site

category

snippet's category

fig.path

directory where figures will be stored

...

extra arguments for knitr's chunk options, such as cache = TRUE

Details

This makes sure in the process that the images go into an accessible directory, and add an "image:" tag to the front-matter displaying one of the snippet's images (to use as a teaser on the main gallery page)

This function was originally inspired by: http://jfisher-usgs.github.com/r/2012/07/03/knitr-jekyll/


dgrtwo/rgallery documentation built on May 15, 2019, 7:28 a.m.