R-alpha: RData in batch
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Thu, 27 Nov 1997 11:09:40 +0100
>>>>> "Philippe" == Philippe Lambert <phlamber@luc.ac.be> writes:
Philippe> Just a word to mention that I have lost 2 hours yesterday to
Philippe> find out why R refused to use a function from a package
Philippe> calling C-code. R invariably answered that the C code was
Philippe> not in the load table (something like this). I have tried
Philippe> everything (or nearly) to solve my problem knowing that this
Philippe> same package used to work on my computer at the university.
Philippe> Finally, I found out that running the same instructions as
Philippe> root work fine. The explanation for my computer sudden good
Philippe> will is not that I was root, but that I ran R in a different
Philippe> directory ... without .RData!! (and I don't care about
Philippe> .RData when I use R in batch mode!!).
Philippe> Thus, would it be possible to have R not creating .RData file
Philippe> by default in batch mode?
Most of us (I think) don't like your proposal;
.RData is the only thing to prevent losses of hours of computation
(simulation runs).
If you want to make sure that a .RData is not interfering at the START of
your batch job, just do
(in a 'sh' script, or even better, in the Makefile, I'd recommend using):
if [ -f .RData ]; mv .RData .RData.old; fi
R < input.R > output.Rout
Philippe> A second potential problem: when I build packages including
Philippe> personal functions, I use to test my functions interactively
Philippe> by typing library(mypackage) after modification of my code in
Philippe> an editor. The problem is that repeating the library load
Philippe> does not erase the old version. Do I do something wrong?
library(.) tries to make sure to be efficient and not load the same things
twice. (--> online help ?library ).
In the case where you are constantly changing / upgrading a library,
you should just work with source(.)
Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._