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

Jos? Luis Aznarte M. wrote:
>     Hi! I've been browsing through the last months' archive and I can't
> find an answer to my question, so here it is (let's hope it's not too
> obvious):
>     I'm working on extensions of an R library, and I would be very
> surprised if everyone developing R packages is doing the following, as I do:
> 
>         1.- Write down a modification of an R file
>         2.- Exit the current R session
>         3.- Install the package as root (sudo R CMD INSTALL...)
>         4.- Launch a new R session
>         5.- Test the change, if it does not work, go back to 1 or debug.
>         6.- Finish.
> 
>     Is this the proper (but quite awkward) way to proceed or there is an
> alternative to skip steps 2 to 4? I'm using emacs with ESS under linux.
> Thank you in advance for your time! Best regards,

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")

okay, after a while, I ended up with a few /sometemplace's and a few R 
sessions, but it is much better than doing installing system-wide
as root and overwriting it over and over with semi-broken or
work-in-progress versions.

Hope this helps.

Hin-Tak Leung



[Rd] Developer work cycle
Hin-Tak Leung