heading_vector {rock} | R Documentation |
Make a vector of strings into headings
Description
This is just a convenience function to convert a vector of strings into markdown or HTML headings at a given 'depth'.
Usage
heading_vector(
x,
headingLevel = rock::opts$get("defaultHeadingLevel"),
output = "markdown",
cat = FALSE
)
Arguments
x |
The vector. |
headingLevel |
The level of the heading; the default can be set
with e.g. |
output |
Whether to output to HTML (" |
cat |
Whether to cat (print) the heading or just invisibly return it. |
Value
The heading, invisibly.
Examples
rock::heading_vector(c("Hello ", "World"), headingLevel=5);
### This produces: "\n\n##### Hello\n\n" and
### "\n\n##### World\n\n"
[Package rock version 0.9.6 Index]