Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rscript - get rid of "WARNING: ignoring environment value of R_HOME"

Tags:

r

rscript

Rscript is very handy. But I'd like to specify output paths at runtime, e.g.: my.Rscript input > output. message() is great for logging to STDERR, but Rscript seems to systematically output WARNING: ignoring environment value of R_HOME to STDOUT, even if specifying --vanilla or --no-environ.

Any workarounds?

(this is R scripting front-end version 2.13.0 (2011-04-13))

like image 806
Yannick Wurm Avatar asked Jun 18 '11 09:06

Yannick Wurm


1 Answers

i assume this is very old. but, with bash, etc.:

unset R_HOME

before running Rscript should do the trick. and, with csh, etc.:

unsetenv R_HOME

should likewise work. since the R front-end script sets R_HOME (after complaining), i don't see any reason for leaving R_HOME set. (possibly i'm missing something.)

like image 101
Greg Minshall Avatar answered Sep 20 '22 07:09

Greg Minshall