Learn R Programming

tables (version 0.9.31)

HTMLfootnotes: Construct footnotes

Description

This function constructs HTML code for footnotes to insert at the bottom of the table.

Usage

HTMLfootnotes(tab, ...)

Value

A character string containing HTML code for the footnotes. Use this in table_options(HTMLfooter = ...)

Arguments

tab

A tabular object, used only so that the column width of the footnotes matches.

...

The footnotes. If named, will be preceded with the name as a superscript.

Examples

Run this code
tab <- tabular( (Species + 1) ~ (n=1) + Format(digits=2)*
         (Sepal.Length + Sepal.Width)*(mean + sd), data=iris )
footnote <- HTMLfootnotes(tab, 
                          "This is a footnote with no marker.", 
                          "*" = "This is a footnote with an asterisk.")
if (interactive())
  toHTML(tab, options = list(doFooter = TRUE,
                           HTMLfooter = footnote))

Run the code above in your browser using DataLab