html_combine | R Documentation |
This function combines multiple HTML files. This is done based on the name of the files and should end with raw.tex to make the function pick-up these files.
html_combine(
combine = ".",
out = NULL,
toctheme = TRUE,
css = paste0(system.file(package = "R3port"), "/style.css"),
clean = 0,
...
)
combine |
character string with the location of the raw html files or list with file names within same directory |
out |
filename for the output HTML file (if NULL it will print to console) |
toctheme |
logical indicating if the created file should also have a toc (take into account for template) |
css |
character with name of the css style sheet to use, default use package style sheet |
clean |
integer between 0 and 2 indicating if all individual files should be kept (0), all individual raw html files should be deleted (1) or all individual files should be deleted (2) |
... |
additional arguments passed through to |
Currently the generated output is saved in the same place where the separate tables and plots are located defined in the 'combine' argument. This is done even when a different file path is specified in 'out' (using the basename function). The reason is to not copy files linked within the document and preventing broken links. This behaviour might change in future releases
The function returns a HTML file (or writes output to console)
# Take into account the usage of tempfile() with multiple function calls
data(Theoph)
html_list(Theoph[1:11,],out=tempfile(fileext=".html"),show=FALSE)
html_plot(plot(conc~Time,data=Theoph),out=tempfile(fileext=".html"),show=FALSE)
## Not run:
html_combine(combine=tempdir(),out="rep1.html")
# toctheme can be used to have a clickable toc,
# a bootstrap template for this is provided in the package
html_combine(combine=tempdir(),out="rep1.html",
template=paste0(system.file(package="R3port"),"/bootstrap.html"),
toctheme=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.