Re: [Rd] type="message" possibility for capture.output() ?

2013-09-23 Thread Prof Brian Ripley
That is not safe ... you should at least check if the message stream is not already diverted. As the help says: Sink-ing the messages stream should be done only with great care. For that stream ‘file’ must be an already open connection, and there is no stack of connections. which

[Rd] Unable to execute Java MapReduce (Hadoop) code from R using rJava

2013-09-23 Thread Gaurav Dasgupta
Hi All, I have written a Java MapReduce code that runs on Hadoop. My intention is to create an R package which will call the Java code and execute the job. Hence, I have written a similar R function. But when I call this function from R terminal, the Hadoop job is not running. Its just printing fe

[Rd] Capture output of install.packages (pipe system2)

2013-09-23 Thread Jeroen Ooms
Is there any way to capture output (both stdout and stderr) from install.packages? Solutions like sink and capture.output don't work because the install.packages calls out to system2 which is executed in a separate process: test <- capture.output(install.packages("MASS")) The system2 function

[Rd] tar warnings in R-3.0.2 RC when R is installed by a different (non-root) user

2013-09-23 Thread Dan Tenenbaum
Hi, I created a package as follows: > a = 1 > package.skeleton() Then I got the following output when building the package: * checking for file ‘anRpackage/DESCRIPTION’ ... OK * preparing ‘anRpackage’: * checking DESCRIPTION meta-information ... OK * checking for LF line-endings in source and m

Re: [Rd] Capture output of install.packages (pipe system2)

2013-09-23 Thread Duncan Murdoch
On 13-09-23 2:17 PM, Jeroen Ooms wrote: Is there any way to capture output (both stdout and stderr) from install.packages? Solutions like sink and capture.output don't work because the install.packages calls out to system2 which is executed in a separate process: test <- capture.output(inst

Re: [Rd] Vignette problem and CRAN policies

2013-09-23 Thread Spencer Graves
Hello, All: Professor Ripley is correct as usual: I misunderstood his original statement of the problem. He gave two possible solutions. I could not make the first solution work, and I didn't try the second until someone else on this list explained it in slightly more detail.

Re: [Rd] Vignette problem and CRAN policies

2013-09-23 Thread Marc Schwartz
Spencer, FYI. I just noted in your post below the error message from WriteXLS regarding TEXT::CSV_XS missing. Please note that in version >=3.0 of WriteXLS (current is 3.2.1), that is no longer required and has been replaced by Text::CSV_PP, which is a Pure Perl module and is included in the W

Re: [Rd] tar warnings in R-3.0.2 RC when R is installed by a different (non-root) user

2013-09-23 Thread Prof Brian Ripley
The issue is not the ownership (uname) but the uid. A tarball can only store uids up to 'nobody' (usually 32767), and certainly larger ones cannot be unpacked portably. The warnings did not occur before, but the tarball produced could cause problems when unpacking with other tools. On 23/09

Re: [Rd] Vignette problem and CRAN policies

2013-09-23 Thread Eric Malitz
take me off here On Mon, Sep 23, 2013 at 4:44 PM, Marc Schwartz wrote: > Spencer, > > FYI. I just noted in your post below the error message from WriteXLS > regarding TEXT::CSV_XS missing. > > Please note that in version >=3.0 of WriteXLS (current is 3.2.1), that is > no longer required and has

Re: [Rd] Vignette problem and CRAN policies

2013-09-23 Thread Joshua Ulrich
As Berend Hasselman already told you, "Then surf to the address given at the end of each posting; go to the bottom of that page and follow the instructions for unsubscribing." Here's the link, so you don't have to scroll to the bottom of this message: https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] tar warnings in R-3.0.2 RC when R is installed by a different (non-root) user

2013-09-23 Thread Dan Tenenbaum
- Original Message - > From: "Prof Brian Ripley" > To: r-devel@r-project.org > Sent: Monday, September 23, 2013 2:53:08 PM > Subject: Re: [Rd] tar warnings in R-3.0.2 RC when R is installed by a > different (non-root) user > > The issue is not the ownership (uname) but the uid. A tarb

Re: [Rd] Vignette problem and CRAN policies

2013-09-23 Thread Spencer Graves
Hi, Marc: That's great. I just did update.packages, then tried "writeFindFn2xls", and it worked! "writeFindFn2xls" is programmed to try WriteXLS. Previously, it failed on my 64-bit installation of R, because of that very problem. I was planning to modify "writeFindFn2xls" to

Re: [Rd] Capture output of install.packages (pipe system2)

2013-09-23 Thread Simon Urbanek
Duncan, On Sep 23, 2013, at 10:20 PM, Duncan Murdoch wrote: > On 13-09-23 2:17 PM, Jeroen Ooms wrote: >> Is there any way to capture output (both stdout and stderr) from >> install.packages? Solutions like sink and capture.output don't work >> because the install.packages calls out to system2 wh

Re: [Rd] Capture output of install.packages (pipe system2)

2013-09-23 Thread Duncan Murdoch
On 13-09-23 6:34 PM, Simon Urbanek wrote: Duncan, On Sep 23, 2013, at 10:20 PM, Duncan Murdoch wrote: On 13-09-23 2:17 PM, Jeroen Ooms wrote: Is there any way to capture output (both stdout and stderr) from install.packages? Solutions like sink and capture.output don't work because the insta

Re: [Rd] regenerate Rscript after moving R installation

2013-09-23 Thread Murray Stokely
Simon, do you have some examples of packages with this attribute? Removing the hard-coding of paths in base R and Rscript is one of the many local patches we've maintained in the R I use at my workplace since at least the R 2.5 days. We do this to enable us to send R and all its dependencies off

Re: [Rd] Capture output of install.packages (pipe system2)

2013-09-23 Thread Hadley Wickham
> Brian Ripley's reply describes how it is done in the tools package. For > example, as I sent privately to Jeroen, > > x <- system2("Rscript", "-e \"install.packages('MASS', > repos='http://probability.ca/cran')\"", stdout=TRUE, stderr=TRUE) > > captures all of the output from installing MASS. A

Re: [Rd] Capture output of install.packages (pipe system2)

2013-09-23 Thread Paul Gilbert
On 13-09-23 08:20 PM, Hadley Wickham wrote: Brian Ripley's reply describes how it is done in the tools package. For example, as I sent privately to Jeroen, x <- system2("Rscript", "-e \"install.packages('MASS', repos='http://probability.ca/cran')\"", stdout=TRUE, stderr=TRUE) captures all of

Re: [Rd] inconsistency/bug in recordPlot/replayPlot

2013-09-23 Thread Paul Murrell
Hi If you want an explicit background (rather than just relying on what the device gives you), you can do something like ... par(bg="white") plot(1:10) recplot = recordPlot() png("bgreplay.png") replayPlot(recplot) dev.off() Would that satisfy your use case ? Paul On 09/14/13 09:17, Gabriel

Re: [Rd] Patch: fix segfault from empty raster

2013-09-23 Thread Paul Murrell
Hi Protecting against empty rasters seems like a good idea(!) Thanks for the report. Could you please try sending me your suggested patch directly? (it did not make it through via r-devel) Paul On 09/16/13 22:24, QRD wrote: Hi, A colleague recently came across an R crash, which I can boil do

Re: [Rd] inconsistency/bug in recordPlot/replayPlot

2013-09-23 Thread Gabriel Becker
Paul, Thanks for the response. On Mon, Sep 23, 2013 at 7:43 PM, Paul Murrell wrote: > > par(bg="white") > > plot(1:10) > recplot = recordPlot() > png("bgreplay.png") > replayPlot(recplot) > dev.off() > > Would that satisfy your use case ? > Unfortunately it does not, as my use-case is in a ca

Re: [Rd] inconsistency/bug in recordPlot/replayPlot

2013-09-23 Thread Eric Malitz
take me off here On Mon, Sep 23, 2013 at 10:31 PM, Gabriel Becker wrote: > Paul, > > Thanks for the response. > > > On Mon, Sep 23, 2013 at 7:43 PM, Paul Murrell >wrote: > > > > > par(bg="white") > > > > plot(1:10) > > recplot = recordPlot() > > png("bgreplay.png") > > replayPlot(recplot) > >

[Rd] library(c("stats4")) produces a misleading error message

2013-09-23 Thread Hervé Pagès
Hi, This error message is very confusing/misleading for novice users: > library(c("stats4")) Error in library(c("stats4")) : 'package' must be of length 1 Could it please be improved to mention something about using 'character.only=TRUE' instead? Thanks, H. -- Hervé Pagès Program in Comp