Usage
html(object, ...)
"html"(object, file, where=c('cwd', 'tmp'), method=c('hevea', 'htlatex'), rmarkdown=FALSE, cleanup=TRUE, ...)
"html"(object, file=paste(first.word(deparse(substitute(object))),'html',sep='.'), header, caption=NULL, rownames=FALSE, align='r', align.header='c', bold.header=TRUE, col.header='Black', border=2, width=NULL, size=100, translate=FALSE, append=FALSE, link=NULL, linkCol=1, linkType=c('href','name'), ...)
"html"(object, file=paste(first.word(deparse(substitute(object))),'html',sep='.'), append=FALSE, link=NULL, linkCol=1, linkType=c('href','name'), ...)
htmlVerbatim(..., size=75, width=85, scroll=FALSE, rows=10, cols=100)
Arguments
object
a data frame or an object created by latex
.
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
. For html.latex
specify file=''
or file=character(0)
to print html code to
the console, as when using knitr
. For the data.frame
method, file
may be set to FALSE
which causes a character
vector enclosed in htmltools::HTML
to be returned instead of
writing to the console.
where
for html
. Default is to put output files in current
working directory. Specify where='tmp'
to put in a system
temporary directory area.
method
default is to use system command hevea
to convert
from LaTeX to html. Specifymethod='htlatex'
to use system
command htlatex
, assuming the
system package TeX4ht
is installed.
rmarkdown
set to TRUE
if using RMarkdown (usually under
knitr
and RStudio). This causes html to be packaged for
RMarkdown and output to go into the console stream. file
is
ignored when rmarkdown=TRUE
.
cleanup
if using method='htlatex'
set to FALSE
if
where='cwd'
to prevent deletion of auxiliary files created by
htlatex
that are not needed when using the final html
document (only the .css
file is needed in addition to
.html
). If using method='hevea'
, cleanup=TRUE
causes deletion of the generated .haux
file.
header
vector of column names. Defaults to names in
object
. Set to NULL
to suppress column names.
caption
a character string to be used as a caption before the
table
rownames
set to FALSE
to ignore row names even if they are
present
align
alignment for table columns (all are assumed to have the
same if is a scalar). Specify "c", "r", "l"
for center, right, or left
alignment.
align.header
same coding as for align
but pertains to
header
bold.header
set to FALSE
to not bold face column headers
col.header
color for column headers
border
set to 0 to not include table cell borders, 1 to include
only outer borders, or 2 (the default) to put borders around cells too
translate
set to TRUE
to run header and table cell text
through the htmlTranslate
function
width
optional table width for html.data.frame
. For full
page width use width="100%"
, for use in options()
for
printing objects.
size
a number between 0 and 100 representing the percent of the
prevailing character size to be used by htmlVerbatim
and the
data frame method.
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
""
. To allow multiple links per link, link
may also be
a character matrix shaped as object
in which case
linkCol
is ignored.
linkCol
column number of object
to which hyperlinks are
attached. Defaults to first column.
linkType
defaults to "href"
...
ignored except for htmlVerbatim
- is a list of
objects to print()
scroll
set to TRUE
to put the html in a scrollable
textarea
rows,cols
the number of rows and columns to devote to the visable
part of the scrollable box