html_doc: Prints a HTML table, listing or plot to a a file or console

View source: R/html_doc.r

html_docR Documentation

Prints a HTML table, listing or plot to a a file or console

Description

This function makes a HTML document using output generated with functions in the R3port package or any other HTML code available as vector. Basically it adds tags to a html template file and let's the user select various options to customize the output.

Usage

html_doc(
  text,
  out = NULL,
  show = TRUE,
  rtitle = "report",
  template = paste0(system.file(package = "R3port"), "/simple.html"),
  rendlist,
  css = paste0(system.file(package = "R3port"), "/style.css")
)

Arguments

text

character vector to be placed within HTML document

out

character with filename for the output HTML file (if NULL it will print to console)

show

logical indicating if the resulting pdf file from the compiled tex file should be opened when created

rtitle

string indicating the title of the output document

template

character with file name of the template file to use

rendlist

list with render items to be used for the template file (see (see whisker-package))

css

character with name of the css style sheet to use, default use package style sheet

Details

This function is used as wrapper within multiple functions in the R3port package but is also convenient in case custom information should be placed within an output document

Value

The function returns a HTML file (or writes output to console)

See Also

ltx_doc

Examples


txt <- "<h1>Example</h1>"
tbl <- "<table><tr><td id='fcol'>table data</td><td>for custom table</td></tr></table>"
add <- "<p>Including some additional text</p>"
## Not run: 
  html_doc(c(txt,tbl,add),out=tempfile(fileext=".html"))

## End(Not run)

R3port documentation built on Sept. 22, 2023, 9:06 a.m.