From Friedrich.Leisch@ci.tuwien.ac.at  Thu Nov 27 10:14:51 1997
From: Friedrich.Leisch@ci.tuwien.ac.at (Friedrich Leisch)
Date: Thu, 27 Nov 1997 11:14:51 +0100
Subject: R-alpha: RData in batch
In-Reply-To: <Pine.OSF.3.96.971127103915.13153A-100000@alpha>
References: <Pine.OSF.3.96.971127103915.13153A-100000@alpha>
Message-ID: <199711271014.LAA27212@galadriel.ci.tuwien.ac.at>

>>>>> On Thu, 27 Nov 1997 11:02:26 +0100 (MET),
>>>>> Philippe Lambert (PL) wrote:

PL> Just a word to mention that I have lost 2 hours yesterday to find out=
 why
PL> R refused to use a function from a package calling C-code.
PL> R invariably answered that the C code was not in the load table (some=
thing
PL> like this). I have tried everything (or nearly) to solve my problem
PL> knowing that this same package used to work on my computer at the
PL> university.
PL> Finally, I found out that running the same instructions as root work =
fine.
PL> The explanation for my computer sudden good will is not that I was ro=
ot,
PL> but that I ran R in a different directory ... without .RData!!
PL> (and I don't care about .RData when I use R in batch mode!!).

There was a bug in dynamic loading by libraries ... the load-table was
written to the .RData file, so R didn't reload any dynamic code after
starting R a second time in a directory upon the library(...) command.
This bug is already fixed in the current sources (which are not
publicly available yet but should be out soon).


PL> Thus,=20
PL> would it be possible to have R not creating .RData file by default in
PL> batch mode?

Why don't you simply rename or delete the .Rdata file before you start
the batch simulation?


PL> A second potential problem: when I build packages including personal
PL> functions, I use to test my functions interactively by typing
PL> library(mypackage) after modification of my code in an editor.
PL> The problem is that repeating the library load does not erase the old
PL> version. Do I do something wrong?

Well, the idea of the library command is to be ``smart'' when loading
code, i.e., library first looks if the package has already been loaded
and only loads the code when this is not already loaded. This way the
overhead of loading the same stuff over and over again can be avoided.

Use source() if you want to override this.


Best,
Fritz

--=20
-------------------------------------------------------------------
                        Friedrich  Leisch                            =20
Institut f=FCr Statistik                      Tel: (+43 1) 58801 4541
Technische Universit=E4t Wien                 Fax: (+43 1)  504 14 98
Wiedner Hauptstra=DFe 8-10/1071      Friedrich.Leisch@ci.tuwien.ac.at
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
     PGP public key http://www.ci.tuwien.ac.at/~leisch/pgp.key
-------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


R-alpha: RData in batch
Friedrich Leisch