View source: R/utils_sourceRmd.R
sourceRmd | R Documentation |
Retrieve the R code from an RMarkdown file and source it into a new environment variable. Uses knitr::purl()
, which comments-out any chunks that are not meant to be evaluated (i.e., eval = F
).
sourceRmd(path, wd = dirname(path), suppress = T, ...)
path |
Path to RMarkdown file |
wd |
Optional working directory to use for script execution. Defaults to the directory containing the RMarkdown file. |
suppress |
Supress all output from executed code? |
... |
Arguments passed on to
|
A new environment containing the results of the sourced R code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.