powered by
This is just a convenience function to convert a vector of strings into markdown or HTML headings at a given 'depth'.
heading_vector( x, headingLevel = rock::opts$get("defaultHeadingLevel"), output = "markdown", cat = FALSE )
The heading, invisibly.
The vector.
The level of the heading; the default can be set with e.g. rock::opts$set(defaultHeadingLevel=1).
rock::opts$set(defaultHeadingLevel=1)
Whether to output to HTML ("html") or markdown (anything else).
html
Whether to cat (print) the heading or just invisibly return it.
rock::heading_vector(c("Hello ", "World"), headingLevel=5); ### This produces: "\n\n##### Hello\n\n" and ### "\n\n##### World\n\n"
Run the code above in your browser using DataLab