with_example: Try renderthis functions with an example
Description
This function primarily exists to ensure that the examples in this package
are readable. But you can also use with_example() to try out the various
output functions.
Invisibly returns the path to the temp directory where the example
was created when clean = FALSE, otherwise invisibly returns the output
from evaluating expr.
Arguments
example
The name of the example file, currently only "slides.Rmd".
code
The code expression to evaluate. You can use the example as an
input by referencing it directly, e.g. from = "slides.Rmd".
clean
Should the example file and any extra files be cleaned up when
the function exits? The default is TRUE, but if you want to inspect the
output you should set to FALSE.