This is a support function using a list-pmap workflow to create a HTML document, using RMarkdown as the engine.
generate_report( title = "My minimal HTML generator", filename = "minimal_html", outputs = output_list, titles, subheaders, echos, levels, theme = "united", preamble = "" )
Character string to specify the title of the chunk.
File name to be used in the exported HTML.
A list of outputs to be added to the HTML report.
levels must have the same
A list/vector of character strings to specify the title of the chunks.
A list/vector of character strings to specify the subheaders for each chunk.
A list/vector of logical values to specify whether to display code.
A list/vector of numeric value to specify the header level of the chunk.
Character vector to specify theme to be used for the report.
A preamble to appear at the beginning of the report, passed as a text string.
An HTML report with the same file name as specified in the arguments is generated in the working directory. No outputs are directly returned by the function.
Below is an example on how to set up a custom report.
The first step is to define the content that will go into a report and assign the outputs to a list.
The next step is to add a list of titles for each of the objects on the list:
The final step is to run
generate_report(). This can all be wrapped within
a function such that the function can be used to generate a HTML report.