There exists toHTML methods in several packages, e.g. in
tools or XML. Package R2HTML has a HTML
generic.
The ‘semantics’ of this function may differ from other
implementations:
the function is expected to take an arbitrary R object
and return an HTML snippet that can be
placed in reports (i.e. in the same spirit as
toLatex). By contrast, the purpose of
toHTML in tools is to provide a whole
HTML document.
The data.frame method has two
handlers arguments: these may store helper
functions for formatting columns, either of a
specific name (col.handlers) or of a specific
class(class.handlers). The functions in
col.handlers are applied first; and the
affected columns are not touched by class.handlers.
See Examples.