Learn R Programming

R3port (version 0.2.5)

html_doc: 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")
)

Value

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

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

See Also

ltx_doc

Examples

Run this code

txt <- "Example"
tbl <- "table datafor custom table"
add <- "Including some additional text"
if (FALSE) {
  html_doc(c(txt,tbl,add),out=tempfile(fileext=".html"))
}

Run the code above in your browser using DataLab