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(...)

Arguments

file

Character value indicating the path and the name to the Rmd file.

...

Arguments passed by read_rmd() to readLines(). In txt_body() they are character values passed to c().

skip_head

Logical value indicating whether the yaml head should be skip or not.

Value

A character vector that can be use as argument for the parameter body in the function write_rmd().

Examples

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) }