[R] CGIwithR and visible output of 'invisible(capture.output(library(...)))'
edd at debian.org
Sat Jan 27 23:19:07 CET 2007
On 27 January 2007 at 22:12, Leo Gürtler wrote:
| Prof Brian Ripley schrieb:
| Dear Prof Ripley,
| thanks for your information, in my first email I mentioned that I use
| Version 2.3.1 (2006-06-01) on ubuntu edgy. Sorry for leaving out the
| version-no. 126.96.36.199-13ubuntu2, together with R2HTML 1.58, installed
| directly from R via 'install.packages()'.
Ubuntu uses miniunzip because Ubunto copies Debian package verbatim.
And on Debian we have been using minizip/miniunzip since 'forever' as the
zip/unzip utilities were at one point restricted as far as their license and
copyright are concerned.
For R's use, we never know we needed to change to zip/unzip so we haven't.
Your report is the first in years I am aware of that demonstrates a
shortcoming in the mini variants. [ There was another problem once years ago
which lead me to write a patch for miniunzip to support '-d tempdir' when the
license made the real unzip unsuitable for the main archive. ]
| Yes - you're right, there is a .deb called 'zlib-bin' which is
| responsible (binary called 'miniunzip'). The original 'unzip' you
| mention is also present but not used, because ->
| trying to deinstall 'zlib-bin' leads to unresolved dependencies with the
| _whole_ 'r-base-core' on ubuntu.
Well, yes. See above. Debian/Ubuntu configures R to use minizip/miniunzip, so
we need to make sure they are present. That's what the Depends is for, and
that's why you can't uninstall zlib-bin.
| This is totally unintelligible, because the man-page of miniunzip states
| "It was written as a demonstration of the zlib(3) library and
| therefore lack many of the features of the unzip(1) program."
| And - of course - there is no option like '-q' or '--q'.
There are several options.
-- First, you deal with it locally by defining
Obviously, this doesn't scale.
-- Second, you or I supply a patch to miniunzip to support -q.
Obviously, that requires work on our part.
-- Third, you hack a shell script unzip that uses miniunzip, but
suppresses output to /dev/null.
-- Fourth, you convince (or bribe) me to switch to unzip in Debian's R, and
you wait til that trickles through to your next Ubuntu upgrade.
In the meantime, do 1) or 3).
In any event, the bug here is with CGIwithR as it assumes that unzip is the
real thing. That may be true, but isn't guaranteed.
| What are my opportunities besides the need to contact the
| ubuntu-maintainers to change the dependencies? There must be stated
There is no "ubuntu-maintainer". Ubuntu just recompiles my Debian package.
| somewhere that R should call miniunzip instead of unzip to decompress
| files. Where can I find that option?
That would be option 2 above. See help("Startup") in R.
Hope this helps,
PS Option 4 has now been implemented in my Debian R sources.
| > This is done by .onLoad, so your settings are irrelevant.
| > We have no information here on your platform, version of R, R2HTML or
| > anything else. But almost certainly the problem is the command given by
| > getOption("unzip"), which looks like an unzip clone not respecting the
| > -q flag.
| > Try using the 'real' unzip () instead, from http://www.info-zip.org/.
| > On Sat, 27 Jan 2007, Leo Gürtler wrote:
| >> Eric schrieb:
| >>> library(R2HTML, verbose = FALSE)
| >> Dear Eric,
| >> thanks - I tried that, but that does not work for me. And it does not
| >> depend whether R2HTML is loaded via script/ batch job (-> webserver,
| >> cgi) or directly within R.
| >> The same happens (of course) by using
| >> require(R2HTML, quietly=TRUE)
| >> Are there any further options I missed?
| >> The problem seems to be that the file "R2HTMLstuff.zip" is extracted
| >> every time (although this is not necessary) - how can I ged rid of that?
| >> thanks,
| >> best,
| >> leo
| >> ----output----
| >>> library(R2HTML, verbose=FALSE)
| >> 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 at 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.
| R-help at stat.math.ethz.ch mailing list
| PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
| and provide commented, minimal, self-contained, reproducible code.
Hell, there are no rules here - we're trying to accomplish something.
-- Thomas A. Edison
More information about the R-help