html {Hmisc} | R Documentation |
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
.
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)
object |
a data frame or an object created by latex . For
show is an object created by html . For the generic
html is any object for which an html method exists. |
file |
name of the file to create. The default file
name is object.html where object is the first word in
the name of the argument for object .
|
append |
set to TRUE to append to an existing file |
link |
character vector specifying hyperlink names to attach to
selected elements of the matrix or data frame. No hyperlinks are used
if link is omitted or for elements of link that are
"" . |
linkCol |
column number of object to which hyperlinks are
attached. Defaults to first column. |
linkType |
defaults to "href" |
... |
arguments passed to format.df |
x |
an object created by html |
print
or show
launch a browser
Frank E. Harrell, Jr.
Department of Biostatistics,
Vanderbilt University,
f.harrell@vanderbilt.edu
Maranget, Luc. HeVeA: a LaTeX to HTML translater. URL: http://para.inria.fr/~maranget/hevea/
## 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)