Description Usage Arguments Value Note Author(s) Examples
This function converts a .Rmd
to a .R
file (similar to knitr::purl
)
by replacing chunk delimiters and putting eval
chunk options inside if
statements. Also comments out (##+
) content that is not inside chunks.
1 |
rmd |
Path to a rmarkdown file. |
encoding |
The encoding of both the input .Rmd file and the output. |
A .R file in the same directory and same name as the input .Rmd file.
UTF-8
is the recommended encoding for scripts and .Rmd files.
Kristian D. Olsen
1 | rmd_to_r("Example report.Rmd", encoding = "latin1")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.