HTML Exportation for R Objects

Includes HTML function and methods to write in an HTML file. Thus, making HTML reports is easy. Includes a function that allows redirection on the fly, which appears to be very useful for teaching purpose, as the student can keep a copy of the produced output to keep all that he did during the course. Package comes with a vignette describing how to write HTML reports for statistical analysis. Finally, a driver for 'Sweave' allows to parse HTML flat files containing R code and to automatically write the corresponding outputs (tables and graphs).


2016-06-23 - Version 2.3.2

  • Fix error on pqR due to '..' instead of '...'.

2014-09-21 - Version 2.3.1

  • Fixed message "Warning in formatC(Signif) : class of 'x' was discarded"
  • Fixed problem looking up objects in Sweave. R Code inside Sweave files is now evaluated in .GlobalEnv, again, as before version 2.3.0.

2014-09-06 - Version 2.3

  • API BREAK: Make package conform to new CRAN policies.
  • .HTML.file is no longer stored in the global environment: use HTMLSetFile() and HTMLGetFile() instead of modifying it directly.
  • .HTMLenv is no longer stored in the global environment: it should never have been accessed directly in the first place.
  • fix() is no longer replaced during HTMLStart()/HTMLStop() sessions.
  • Remove obsolete handling of 'date' class from package survival.
  • Remove obsolete support for old format of objects from the rpart package.


  • Correction of a minor bug in HTMLInitFile discovered by Beno�t Beck

2010-05-19 - Version 2.1

  • Add line breaks in HTML generation for better readability.

2008-05-23 - Version 1.59

  • Corrected call of unexported function from Sweave.R (utils package) in RweaveHTMLWritedoc.

  • Corrected explicit call of S3Method print from package xtable.

  • Corrected explicit call of S3Method from package nnet.

  • Corrected explicit call of isInitialized from nlme package.

  • Corrected explicit call of volume from cluster package.

  • Corrected explicit calls of imp.moments from boot package.

  • Corrected explicit calls of splineOrder and splineKnots from splines package.

  • Corrected explicit call of date.ddmmmyy from survival package.

  • Fixed rpart HTML S3 method to include tree.depth function defined internally, as rpart package is not exporting it anymore.

  • Fixed .HTML.file warning of no visible bindings in almost every function of the package.

  • Fixed bug in outputing invalid code (missing opening ) when row.names was set to FALSE. As patch submited by Michael Irskens and also reported by Rik Schoemaker.

  • Fixed bug in HTML.matrix, opening of wasn't being carried. Pending the fixing of excess of 's.

  • Fixed miscelaneous bugs in CSS files.

2006-09-28 - Version 1.58

  • Fixed bug in HTMLcore.R (unintended \ interpolation)

  • Fixed bug in HTMLfi() call inside HTML.summary.lm, which made R CMD check fail on Windows.

  • Uniformization of capitalization of HTML tags (to lowercase), in conformity with the XHTML 1.0 standard.

  • Updated to include row.names option, as contributed by Tobias Verbeke on 2006-05-27.

2006-07-04 - Version 1.57

  • Added the HTML2clip wrapper, suggested by Gabor Gronthendieck.

  • Miscelaneous fixes to documentation (contributed by Tobias Verbeke)

  • Cleaning up of man directory of spurious files as suggested by Kurt Honik

2006-01-25 - Version 1.56

  • Replaced instances of format.char (now deprecated in R 2.2.0) by formatC.

  • Enclosed HTMLInsertGraph examples in \dontrun{}, so that R CMD check runs fine without an interactive display.

2005-02-28 - Version 1.52

  • Added methods for lme/nlme, submitted by: Dieter Menne, (Dr. Menne Biomed Software T�bingen)

2005-01-13 - Version 1.51

  • Added as.latex and HTML.latex to write pieces of equations in Latex. They will be displayed using AsciiMathML

2004-11-20 - Version 1.5

  • Includes a grid xHTML/css/Javascript compoment from ActiveWidgets http://www.activewidgets.com This grid is used by some functions, basically: HTMLgrid (use data exported in a raw text file) HTMLgrid_inline (include data within the HTML file) HTMLgrid_summary (a summary method for data.frames)

    WARNING: may not fully work on Firefox.

2004-10-19 - Version 1.4-3

  • HTML.matrix and now can use several new output options as they call now 'format. This allows using a comma "," as decimal separator for example. All 'format' arguments are allowed and can be used as a single element (value applies to all columns) or a vector (provide values for each column). - Suggestion by Arne Henningsen

  • now has a sortableDF option. When using it, a link to an external DHTML behavior file is done (suggestion by Tom Short, could be used by it's wonderful Rpad)

  • Available options that user may want to change (default for every matrix/DF): R2HTML.sortableDF (FALSE) R2HTML.format.digits (2) R2HTML.format.nsmall (0) R2HTML.format.big.mark ("") R2HTML.format.big.interval (3) R2HTML.format.decimal.mark= (Sys.localeconv()[["decimal_point"]])

  • Bug fixed: HTML.table

Following modifications contributed by Philippe Grosjean

  • Now uses NAMESPACE

  • Renamed .First.lib() into .onLoad()

  • In RweaveHTMLSetup(), commented if(!require(R2HTML)) stop("R2HTML package is required."). This is not useful, becasue this function IS in R2HTML package!!!

  • Changed utils:::XXX and utils::XXX into XXX everywhere, and added import(utils) in NAMESPACE instead.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.3.2 by Milan Bouchet-Valat, 5 years ago

Browse source code at

Authors: Eric Lecoutre [aut] , Milan Bouchet-Valat [cre, ctb] , Thomas Friedrichsmeier [ctb]

Documentation:   PDF Manual  

Task views: Reproducible Research

GPL (>= 2) license

Imports stats, graphics, utils, grDevices, methods

Suggests boot, splines, survival, cluster, nlme, rpart, nnet

Imported by RSCABS, RcmdrPlugin.temis, StatCharrms, cascsim, clusterSim, dsa, pubmed.mineR, umx.

Depended on by BHTSpack, ELISAtools, FFD, HTMLUtils, RcmdrPlugin.EACSPIR, STAR, permPATH.

Suggested by ascii, poliscidata.

See at CRAN