Learn R Programming

HKRbook (version 0.1.3)

toHTML.html_matrix: toHTML

Description

Returns a HTMl representation of a matrix and optionally shows the result in the browser. If you decide to view the result in a browser then the HTML will be written to a temporary file and utils::browseURL() called

Usage

# S3 method for html_matrix
toHTML(x, browser = FALSE, ...)

# S3 method for table toHTML(x, browser = FALSE, ...)

# S3 method for matrix toHTML(x, browser = FALSE, ...)

Value

html_matrix object

Arguments

x

html_matrix object

browser

logical: show HTML in a browser (default: FALSE)

...

further parameters to utils::browseURL()

Examples

Run this code
library("tools")
m    <- matrix(1:12, ncol=4)
hm   <- html_matrix(m)
html <- toHTML(hm, browser=interactive())

Run the code above in your browser using DataLab