toHTML: toHTML, toLatex, toHTMLorLatex

toHTML.html_matrixR Documentation

toHTML, toLatex, toHTMLorLatex

Description

  • toHTML 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

  • toLatex returns a LaTeX representation of a matrix, but supports just a small subset ot style options

  • toHTMLorLatex returns a HTML or LaTeX representation of a matrix, depending if exams2pdf is in the call list or not

Usage

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

## S3 method for class 'html_matrix'
toLatex(object, ...)

toHTMLorLatex(x, ...)

Arguments

x, object

html_matrix object

browser

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

...

further parameters to utils::browseURL()

Value

character

Examples

library("tools")
m    <- matrix(1:12, ncol=4)
hm   <- html_matrix(m)
html <- toHTML(hm, browser=TRUE)
toHTML(hm)
toLatex(hm)

sigbertklinke/exams2moodle documentation built on July 6, 2023, 3:26 p.m.