Description Usage Arguments Value See Also Examples
View source: R/create_yaml_header.R
This function tweaks the behavior of as.yaml
to return
a string which can immediately be used as an R Markdown YAML header.
It's designed to accept both deeply nested lists and simpler list formats
to make reasoning about your header easier.
1 2 3 4 5 6 7 8 |
... |
A set of objects that will be combined into the YAML header. Objects may be provided as lists (the structure list("outputs" = "html_document") translates to outputs: html_document) or as single-item named vectors (passing "title" = "My Report" to ... will translate to title: "My Report"). |
line.sep, indent, unicode, indent.mapping.sequence, handlers |
Additional arguments to be passed to |
Returns a string formatted for use as an R Markdown YAML header.
Other manipulation functions:
heddle()
,
make_template()
,
provide_parameters()
,
use_parameters()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | headerContent <- list(
"title" = "Testing YAML",
"author" = "Mike Mahoney",
"output" = list(
"flexdashboard::flex_dashboard" = list(
"vertical_layout" = "fill",
"orientation" = "rows",
"css" = "bootstrap.css"
)
)
)
create_yaml_header(headerContent)
create_yaml_header(
"title" = "testing",
"params" = list("data" = "NA"),
list("author" = "Mike Mahoney")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.