exportToHTML: Exporting tables to HTML

View source: R/exportToHTML.R

exportToHTMLR Documentation

Exporting tables to HTML

Description

This function exports data frames or matrices to HTML, sending output to one or more of the console, viewer, and one or more files.

Usage

exportToHTML(
  input,
  output = ufs::opts$get("tableOutput"),
  tableOutputCSS = ufs::opts$get("tableOutputCSS")
)

Arguments

input

Either a data.frame, table, or matrix, or a list with three elements: pre, input, and post. The pre and post are simply prepended and postpended to the HTML generated based on the input$input element.

output

The output: a character vector with one or more of "console" (the raw concatenated input, without conversion to HTML), "viewer", which uses the RStudio viewer if available, and one or more filenames in existing directories.

tableOutputCSS

The CSS to use for the HTML table.

Value

Invisibly, the (potentially concatenated) input as character vector.

Examples

exportToHTML(mtcars[1:5, 1:5]);

ufs documentation built on May 29, 2024, 10:30 a.m.