Re: [Rd] regenerate Rscript after moving R installation
Dear Simon, Many thanks for all additional detail and insight into your practice using rhome and symlinks. Much appreciated! Best, Tobias - Original Message - > From: "Simon Urbanek" > To: "Tobias Verbeke" > Cc: r-devel@r-project.org > Sent: Sunday, September 22, 2013 3:45:41 AM > Subject: Re: [Rd] regenerate Rscript after moving R installation > > I forgot to mention that some packages bake-in paths as well, so even if you > fix both R and Rscript, it will still not work in general. > > On Sep 22, 2013, at 3:42 AM, Simon Urbanek > wrote: > > > On Sep 21, 2013, at 8:43 PM, Tobias Verbeke > > wrote: > > > >> L.S. > >> > >> In this bug report > >> > >> https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14493#c1 > >> > >> it is mentioned that after moving an R installation > >> one should regenerate the Rscript executable. > >> > >> Is there an easy way to do so (after an R installation has been > >> moved)? > >> > > > > You cannot move installed R. Once you run make install, there are several > > places in which paths get baked in - mainly Rscript and the R start > > script. What I typically do for deployment on the Labs machines is to use > > make install rhome= where is some path that I can always create > > a symlink in (I also use DESTDIR so that path doesn't actually need to > > exist on the build machine and it avoid polluting --prefix which is not > > needed). That way you can move R wherever you want as long so you keep > > that one symlink up to date. > > > > Cheers, > > Simon > > > > > >> I have not found any information in the R installation and > >> administration manual. > >> > >> Many thanks in advance for any pointer. > >> > >> Best wishes, > >> Tobias > >> > >> P.S. The background to this question is the usage of Rscript > >> calls in the Makevars files of some R packages on CRAN, so > >> the 'broken' Rscript prevents installation of certain R packages. > >> > >> -- > >> > >> Tobias Verbeke > >> Manager > >> > >> OpenAnalytics BVBA > >> Jupiterstraat 20 > >> 2600 Antwerp > >> Belgium > >> > >> E tobias.verb...@openanalytics.eu > >> M +32 499 36 33 15 > >> http://www.openanalytics.eu > >> > >> __ > >> R-devel@r-project.org mailing list > >> https://stat.ethz.ch/mailman/listinfo/r-devel > >> > >> > > > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] type="message" possibility for capture.output() ?
As far as I can tell, there's no built-in way to get capture.output() to capture messages (stderr) instead of stdout ... suggested, fairly trivial, patch below. f <- function() { message("abc") cat("def\n") } x <- capture.output(f()) ## prints 'abc' x ## value: "def" source("~/R/r-devel/src/library/utils/R/capture.output.R") x <- capture.output(f()) ## unchanged x <- capture.output(f(),type="message") ## prints 'def': value 'abc' Of course, if someone was going to mess with this function more, it might be nice to have an option to have *both* streams captured ... Index: capture.output.R === --- capture.output.R(revision 63969) +++ capture.output.R(working copy) @@ -16,8 +16,10 @@ # A copy of the GNU General Public License is available at # http://www.r-project.org/Licenses/ -capture.output <- function(..., file=NULL, append=FALSE) +capture.output <- function(..., file=NULL, append=FALSE, + type = c("output", "message")) { +type <- match.arg(type) args <- substitute(list(...))[-1L] rval <- NULL; closeit <- TRUE @@ -31,9 +33,9 @@ } else stop("'file' must be NULL, a character string or a connection") -sink(file) +sink(file,type=type) ## for error recovery: all output will be lost if file=NULL -on.exit({sink(); if(closeit) close(file)}) +on.exit({sink(type=type); if(closeit) close(file)}) pf <- parent.frame() evalVis <- function(expr) @@ -50,7 +52,7 @@ } ## we need to close the text connection before returning 'rval' on.exit() -sink() +sink(type=type) if(closeit) close(file) if(is.null(rval)) invisible(NULL) else rval } __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Mailing Lists page, turning off HTML mail
Hello, I just noticed that the link to instructions on turning off HTML mail has been dead for quite some time. The last capture I could find on web.archive.org was in mid-2009. http://web.archive.org/web/20090625155306/http://www.expita.com/nomime.html For reference, the link is in the following sentence: "For more details and instructions on turning off HTML for your e-mail software, see here." Best, -- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel