[R] toggleDoc: clutter reduction mainly for S4 documentation files

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Mon 23 Oct 2006 - 19:04:05 GMT

The following perl-script is available from


After it is tested on other systems (currently only Windows), I plan to upload it to


toggleDoc.pl: Clutter reduction for S4-R documentation files.

Version 1.0, 23.10.2006


Perl script to optionally reduce clutter in the index file of S4 html and in S3
files with many repetitive functions documentation. For an example using the documentation of the coin package, see
http://www.menne-biomed.de/download/00Index.html .

Install and Convert

Put the file toggleDoc.pl and the javascript file toggleDoc.js into the Rxxx/library
directory (you should find the R.css file there). For the protection of your valuable assets, when you run this script unmodified
new files 00IndexNew.html will be generated in each directory.

If you want to replace your original 00Index.html with the modified ones, re-run
this script with the two commented lines a the bottom of the Perl script commented out.

What it does:

Only 00Index.html files are changed by adding a javascript reference and a checkbox to switch between the "Show All" mode and the short mode; the latter
is made the default on startup.
All references that have a "," are hidden in the short mode, e.g.


In addition, repetitive similar entries with a common target file are collapsed
to the first entry. For example, in R2HTML the following list only shows the first HTML reference in short mode.

HTML Outputs an object to a HTML file HTML.anova.loglm Outputs an object to a HTML file HTML.aov Outputs an object to a HTML file

The program does not touch files with the string "toggleDoc.js" in the header, so if you want to protect single files from being processed, simply add this string in a comment to the html file (but not that this will be overridden anyway on the next update.)

The function has been tested with IE and Firefox 1.5.

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 24 05:08:33 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 23 Oct 2006 - 20:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.