4 hwrite
Value
A character vector containing the output HTML code.
General arguments
The following optional arguments can always be used:
br a logical specifying if a breakline (carriage return) should be appended at the end of x. Default
is FALSE.
table a logical controlling if the object x should be written as an HTML table. Default is TRUE for
matrices and vectors containing more than one element, and FALSE otherwise. If set to FALSE,
the object is written as a vector (or a matrix) of HTML text elements.
link a character vector containing the URLs the HTML element will point to. This argument is the
equivalent of the attribute href of the HTML tag <a>.
name a character string naming the HTML element for further reference. This is the equivalent of
the attribute name of the HTML tag <a>.
div a logical. If TRUE, places the HTML element into a HTML section, using the <div> HTML tag.
This is helpful for styling a section. Default is FALSE.
center a logical indicating if x should be centered. Default is FALSE. This element may interfere
with the current CSS style. Please consider the use the CSS style attribute "text-align" instead.
... Additional arguments are added to the HTML element as HTML attributes. For HTML tables,
attributes are distributed on table cells using R recycling rules. For text elements, a <span>
HTML tag (or <div> if div is TRUE) is used to accommodate the attributes.
Additional arguments for text elements
If x is rendered as an HTML text element, the following optional arguments can be used:
heading a numeric containing the heading level style. Valid values spans from 1 to 5. See Exam-
ples.
Additional arguments for vectors
If x is a vector with more than one element, the following optional arguments can be used:
dim a couple of optional numeric values indicating the desired number of rows and columns in the
table. This is useful to orient a vector.
byrow logical. If TRUE, the table is filled by rows first, otherwise the table is filled by columns first.
Default is FALSE.
names a logical indicating if the names of the elements should be written if the vector is named.
Default is TRUE.