From hin-tak.leung at cimr.cam.ac.uk  Mon Mar 26 20:38:05 2007
From: hin-tak.leung at cimr.cam.ac.uk (Hin-Tak Leung)
Date: Mon, 26 Mar 2007 19:38:05 +0100
Subject: [Rd] Developer work cycle
In-Reply-To: <4608102B.1090604@decsai.ugr.es>
References: <4607F803.7060700@decsai.ugr.es> <4608019F.7000303@cimr.cam.ac.uk>
	<4608102B.1090604@decsai.ugr.es>
Message-ID: <4608130D.9080801@cimr.cam.ac.uk>

Jos? Luis Aznarte M. wrote:
> Hin-Tak Leung wrote:
>> I don't do 2, 3, 4 that way. I just run the sessions in parallel,
>> and do (no root privilege required):
>>
>> R CMD INSTALL -l sometemplace mypackage
>>
>> and in a parallel session, do
>>
>> library(mypackage, lib.loc="sometemplate")
>     What do you mean by "sometemplate"? Is that the complete path to
> where the library's source is? Or is it a temporary folder to install
> it? In that case, I could use /tmp/ (in linux) to install test versions
> of the library? And, by doing the "library(mypackage, lib.log="/tmp")"
> call, do I overwrite the current one, including namespaces and so on?
>     Sorry I did not understand exactly what you meant. Thank you so much
> anyway. :-)

typo... happier with this below? Both of them (same "/tmp") is
an alternative installed location, not source location.

R CMD INSTALL -l /tmp mypackage

library(mypackage, lib.loc="/tmp")

I don't think you can do 'library(mypackage, lib.loc="/tmp")' twice
(with a re-install in the middle), if that's what you are thinking.
I think you need to do detach(package:mypackage) at least,
and even then, windows's dll loader gets very confused. I believe
I had managed to crash R by dyn.load()'ing two object files of the
same name twice under wine, so I am not sure it is a good idea.

I read somewhere that object files are never unloaded, but you'll need 
to hear it from the R experts...

HTL



[Rd] Developer work cycle
Hin-Tak Leung