generate_rmd_file {TBox} | R Documentation |
Generate Rmd file
Description
This function creates the Rmd file which will be rendered in a specific format.
Usage
generate_rmd_file(
content,
output_format = c("word", "pdf", "html", "word_document", "pdf_document",
"html_document"),
code = TRUE,
...
)
Arguments
content |
a string. The body of the Rmd file (for example code or text) |
output_format |
a string representing the output format. The values
|
code |
a boolean. Should the |
... |
other arguments passed to R chunk (for example
|
Details
More information about the argument ... in the documentation of the
function render_code
.
Value
a vector of characters representing an Rmd file (each element being a line)
Examples
generate_rmd_file(content = "Bonjour tout le monde",
code = FALSE,
output_format = "word")
generate_rmd_file(content = "print(AirPassengers)",
code = TRUE,
output_format = "pdf",
eval = TRUE,
echo = FALSE)
generate_rmd_file(content = "plot(AirPassengers)",
code = TRUE,
output_format = "html_document",
eval = FALSE,
echo = TRUE)
[Package TBox version 0.2.2 Index]