The function read_rmd()
reads Rmd files into character vectors pasting a
line break at the end of each line.
The function txt_body()
will do the same to one or more character vectors.
read_rmd(file, ..., skip_head = TRUE) txt_body(...)
file | Character value indicating the path and the name to the Rmd file. |
---|---|
... | Arguments passed by |
skip_head | Logical value indicating whether the yaml head should be skip or not. |
A character vector that can be use as argument for the parameter body
in
the function write_rmd()
.
if (FALSE) { ## Read pre-installed example ex_document <- read_rmd(file.path(path.package("yamlme"), "taxlistjourney.Rmd")) ## Include this document as body my_document <- write_rmd( title = "A journey in rOpenSci", author = "Miguel Alvarez", output = "html_document", body = ex_document) }