[R] CGIwithR and visible output of 'invisible(capture.output(library(...)))'

From: Leo Gürtler <leog_at_anicca-vijja.de>
Date: Fri 26 Jan 2007 - 01:51:53 GMT

Dear alltogether,

I want to use CGIwithR in conjunction with R2HTML.

A small example called 'test.R':


#! /usr/bin/R
invisible(capture.output(library(R2HTML))) HTML(summary(as.numeric(scanText(formData$numbers))), file=stdout())


The script gets its input via 'CGIwithR.cgi' and contains the variable "numbers."

The 'HTML' output (-> summary() in this example) goes well, but the loading of the R2HTML library is also printed (!) in the resulting html page.

As I took the example from the original CGIwithR examples and I also read the manpages of invisible() and capture.output(), I do not find a logical reason why this still happens.

Deleting the line with "invisible ... library().." and adding 'library(R2HTML)' to .Rprofile does not solve the problem.

I use ubuntu edgy, R Version 2.3.1 (2006-06-01)

THANKS! best wishes,


PS: the output is (uncut)


MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant more info at
http://www.winimage.com/zLibDll/unzip.html /usr/local/lib/R/site-library/R2HTML/output/R2HTMLstuff.zip opened extracting: ASCIIMathML.js extracting: factor.gif extracting: gridR2HTML.css extracting: gridR2HTML.js extracting: numeric.gif extracting: Pastel.css extracting: R2HTML.css extracting: R2HTMLlogo.gif creating directory: runtime/ creating directory: runtime/lib/ extracting: runtime/lib/grid.js extracting: runtime/readme.txt creating directory: runtime/styles/ creating directory: runtime/styles/classic/ extracting: runtime/styles/classic/gecko.xml extracting:

runtime/styles/classic/grid.css extracting:
runtime/styles/classic/grid.png extracting:
runtime/styles/classic/icons.png extracting:
runtime/styles/classic/loading.gif creating directory:
runtime/styles/flat/ extracting: runtime/styles/flat/gecko.xml
extracting: runtime/styles/flat/grid.css extracting:
runtime/styles/flat/grid.png extracting: runtime/styles/flat/icons.png extracting: runtime/styles/flat/loading.gif creating directory: runtime/styles/xp/ extracting: runtime/styles/xp/gecko.xml extracting: runtime/styles/xp/grid.css extracting: runtime/styles/xp/grid.png extracting: runtime/styles/xp/icons.png extracting: runtime/styles/xp/loading.gif extracting: SciViews.css extracting: tablesort.htc

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 Fri Jan 26 12:57:04 2007

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 Sat 27 Jan 2007 - 04:30:30 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.