Description Usage Arguments Details Examples
Function for making HTML tables from an R 'table-like' object; ie, a
data.frame
or a matrix
. It simply parses the item as an HTML table.
1 2 3 |
x |
the |
attr |
attributes to be passed to the |
row.spans |
a matrix specifying desired row.spans, for largers cells. |
col.spans |
a matrix specifying desired column spans, for larger cells. |
use.row.names |
if you submit an object with row names, use those names in construction of the table. |
use.col.names |
if you submit an object with column names, use those names in construction of the table. |
clean |
boolean. if |
replace.periods |
replace periods with spaces? |
The row.spans and col.spans argument can be specified as a matrix to
set the row or column span of a certain cell to be >1, if desired.
See pxt
for an example implementation.
It will also handle 'boxes', e.g. cells with both rowspan and colspan > 1.
Note that the default behavior is to 'clean'
numeric input; this prints
numeric values with a maximum of four digits; ie, through the "%.4G"
format
specifier. Alternatively,
you can use a format specifier (as used in sprintf
) to ensure numbers
are formatted and displayed as desired.
1 2 | dat <- data.frame( apple=c(1.2150125, 2, 3), banana=c("a", "b", "c") )
makeHTMLTable( dat )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.