write_rmd | R Documentation |
This function generates R-Markdown documents by including
the settings as arguments of the function.
Comments and pieces of header can be also added through the argument
append
.
write_rmd(object, ...) ## S3 method for class 'rmd_doc' write_rmd(object, filename, ...)
object |
rmd_doc object used to write an Rmarkdown file. If
header is missing, |
... |
Further arguments passed among methods (not yet used). |
filename |
A character value with the name of the file to be written. If not included, the extension *.Rmd will be appended to this name. If missing, no file will be written by this function. |
A character vector of class rmd_doc
and, if argument set for parameter
filename
, an Rmd file.
## Not run: my_document <- list( title = "Sample Document", author = "Miguel Alavarez", output = "html_document", body = txt_body( "# Intro", "", "This is just an example." ) ) my_document <- as(my_document, "rmd_doc") write_rmd(my_document, filename = file.path(tempdir(), "example")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.