html {Hmisc} | R Documentation |
Convert an S object to HTML
Description
html
is a generic function, for which only two methods are currently
implemented, html.latex
and a rudimentary
html.data.frame
. The former uses the HeVeA
LaTeX to HTML
translator by Maranget to create an HTML file from a LaTeX file like
the one produced by latex
. The resulting HTML file may be
displayed using a show
or a print
method. The browser
specified in options(browser=)
for R (help.browser
for
S-Plus) is launched to display the HTML file. html.default
just
runs html.data.frame
.
Usage
html(object, ...)
## S3 method for class 'latex'
html(object, file, ...)
## S3 method for class 'data.frame'
html(object,
file=paste(first.word(deparse(substitute(object))),'html',sep='.'),
append=FALSE, link=NULL, linkCol=1, linkType=c('href','name'), ...)
## Default S3 method:
html(object,
file=paste(first.word(deparse(substitute(object))),'html',sep='.'),
append=FALSE, link=NULL, linkCol=1, linkType=c('href','name'), ...)
## S3 method for class 'html'
print(x, ...)
## S3 method for class 'html'
show(object)
Arguments
object |
a data frame or an object created by |
file |
name of the file to create. The default file
name is |
append |
set to |
link |
character vector specifying hyperlink names to attach to
selected elements of the matrix or data frame. No hyperlinks are used
if |
linkCol |
column number of |
linkType |
defaults to |
... |
ignored |
x |
an object created by |
Side Effects
print
or show
launch a browser
Author(s)
Frank E. Harrell, Jr.
Department of Biostatistics,
Vanderbilt University,
f.harrell@vanderbilt.edu
References
Maranget, Luc. HeVeA: a LaTeX to HTML translater. URL: http://para.inria.fr/~maranget/hevea/
See Also
Examples
## Not run:
x <- matrix(1:6, nrow=2, dimnames=list(c('a','b'),c('c','d','e')))
w <- latex(x)
h <- html(w) # run HeVeA to convert .tex to .html
h <- html(x) # convert x directly to html
options(browser='konqueror') # use help.browser for S-Plus
h # launch html browser by running print.html
w <- html(x, link=c('','B')) # hyperlink first row first col to B
## End(Not run)