b-create-html-documents.Rmd
library(finddxtemplate)
The html_document_find()
function converts an .Rmd file to .html format. It admits toc
, toc_depth
, toc_float
and code_folding
arguments, similar to those of the rmarkdown::html_document()
function, to control the appearance of the table of contents and code folding.
The html_document_find()
function is called in the output_format
argument of the rmarkdown::render()
function.
# Store in temp file for the example
rmddir <- tempfile(pattern = "rmd-")
dir.create(rmddir)
# Knit
rmarkdown::render(input = system.file("rmarkdown", "rmd_template.Rmd", package = "finddxtemplate"),
output_format = html_document_find(),
output_dir = rmddir)
# Open the knitted example
browseURL(file.path(rmddir, "rmd_template.html"))
Alternatively, you can change the output
field in the YAML header of your .Rmd file: