Re: [Rd] regenerate Rscript after moving R installation

2013-09-24 Thread Simon Urbanek
Murray, On Sep 24, 2013, at 2:18 AM, Murray Stokely wrote: > Simon, do you have some examples of packages with this attribute? As Brian pointed out, some of them concern linking (I'm typically worried about OS X and Dirk has fixed Rcpp there), but there are also others that store package path

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

2013-09-24 Thread Michael Weylandt
https://stat.ethz.ch/pipermail/r-devel/2013-September/067563.html Same instructions still apply -- this is a self-subscription list. M On Sep 24, 2013, at 0:42, Eric Malitz wrote: > take me off here > > > On Mon, Sep 23, 2013 at 10:31 PM, Gabriel Becker wrote: > >> Paul, >> >> Thanks for

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

2013-09-24 Thread Jeroen Ooms
On Mon, Sep 23, 2013 at 6:50 PM, Duncan Murdoch wrote: > x <- system2("Rscript", "-e \"install.packages('MASS', > repos='http://probability.ca/cran')\"", stdout=TRUE, stderr=TRUE) Thank you, this suggestion seems to work (although I agree that starting 3 procs to install a single package seems su

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

2013-09-24 Thread Hadley Wickham
You shouldn't assume - use file.path(R.home("bin"), "R") Hadley On Tue, Sep 24, 2013 at 9:37 AM, Jeroen Ooms wrote: > On Mon, Sep 23, 2013 at 6:50 PM, Duncan Murdoch > wrote: >> x <- system2("Rscript", "-e \"install.packages('MASS', >> repos='http://probability.ca/cran')\"", stdout=TRUE, stderr

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

2013-09-24 Thread Jeroen Ooms
On Mon, Sep 23, 2013 at 6:34 PM, Simon Urbanek wrote: > On top of my head for full capture I can only think of custom C code that > will re-direct stderr/out FDs as desired (it's really trivial to re-direct to > files, for dynamic capture it's a little more involved but there are examples > tha

[Rd] recordPlot() on non-interactive graphics device?

2013-09-24 Thread Henrik Bengtsson
Hi. Q. Is there a way to record a plot using grDevices::recordPlot() without opening an interactive (=visible GUI window) graphics device (not even for a flash of a second)? Related: help("recordPlot", package="grDevices") says: "These functions record and replay the displaylist of the current

Re: [Rd] recordPlot() on non-interactive graphics device?

2013-09-24 Thread Gabriel Becker
Henrik, This works for me: > png("test.png") > dev.control(displaylist="enable") > plot(1:10) > rp = recordPlot() > dev.off() X11cairo 2 > rp HTH, ~G sessionInfo(): R version 3.0.1 (2013-05-16) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C

Re: [Rd] recordPlot() on non-interactive graphics device?

2013-09-24 Thread Gabriel Becker
To be a little less terse: I agree that notes/discussion about what recordPlot/replayPlot do when there is no display list and that non-interactive devices don't create a displaylist by default but can be instructed to do so via dev.control (at least some, I don't claim to have checked them all) w

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

2013-09-24 Thread Duncan Murdoch
On 13-09-24 10:37 AM, Jeroen Ooms wrote: On Mon, Sep 23, 2013 at 6:50 PM, Duncan Murdoch wrote: x <- system2("Rscript", "-e \"install.packages('MASS', repos='http://probability.ca/cran')\"", stdout=TRUE, stderr=TRUE) Thank you, this suggestion seems to work (although I agree that starting 3 p

Re: [Rd] recordPlot() on non-interactive graphics device?

2013-09-24 Thread Henrik Bengtsson
Thanks Gabriel. It works - I did not know about dev.control() and its help page clearly says that "Initially recording is on for screen devices, and off for print devices". I've submitted a patch (PR#15472) for adding a "see also" linking to dev.control(): Bug 15472 - PATCH: Adding see also link

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

2013-09-24 Thread Paul Murrell
Hi Unfortunately, my main advice would be not to rely on recordPlot() because it (or at least the underlying display list format) was never intended for this sort of thing. I doubt that helps though :) I might be able to help more, or look at developing a "transportable object class for R g