[Rd] Load a package without installing it

Romain Francois romain.francois at dbmail.com
Fri Sep 4 15:46:17 CEST 2009


On 09/04/2009 03:39 PM, Hadley Wickham wrote:
>
> Hi all,
>
> When developing a package, it's often useful to be able to reload it,
> without re-installing, re-starting R and re-loading.  To do this I've
> written a little script that inspects the package description and
> loads dependencies, data and code - http://gist.github.com/180883.
> It's obviously not very general (being tailored to my description
> files) and won't work for packages containing C code, but I hope you
> might find it useful nonetheless.
>
> Any comments would be appreciated.
>
> Hadley

Nice. I would guess many of us would have versions of this, it would be 
good to formalise it so that it could deal with :
- namespaces, you might want your unexported functions to be separate 
from your exported functions. It looks like your function loads 
everything into .GlobalEnv
- S4 objects, what would happen if you re-source the definition of an S4 
class and continue to manage objects created before the resourcing

Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/xMdt : update on the ant package
|- http://tr.im/xHLs : R capable version of ant
`- http://tr.im/xHiZ : Tip: get java home from R with rJava



More information about the R-devel mailing list