Import Rmd files into objects of class rmd_doc.
The function txt_body()
add a line break at the end of each element of a
character vector considering them as single lines.
Note that comments will be deleted in the input file.
Arguments
- file
Character value indicating the path and the name to the Rmd file.
- ...
Arguments passed by
read_rmd()
toreadLines()
. Intxt_body()
they are character values passed toc()
.- skip_head
Logical value indicating whether the yaml head should be skip or not (this argument is not used at the moment).
Value
The function read_rmd()
returns a rmd_doc object.
The function txt_body()
, a character vector suitable 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"
))
}