Description Usage Arguments Value Examples
View source: R/replace_code_chunks.R
Replace code from an rmarkdown document as a vector of lines
1 | replace_code_chunks(lines, replace_flags, replacement = "", comment = TRUE)
|
lines |
A character vector of lines from an Rmarkdown document which will be parsed and have included code chunks selectively replaced. |
replace_flags |
A character vector of code chunk options that if set to TRUE will have their code replaced. |
replacement |
A character vector that code chunks will be replaced with, one element per line. |
comment |
TRUE or FALSE; whether to include comments. Default is TRUE |
A vector of lines that forms the content of a new .Rmd document
1 2 3 4 5 6 | ## Not run:
replace_code_chunks(lines,
replace_flags = "solution",
replacement = "### Your Code Here")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.