[Rd] Load a package without installing it

Hadley Wickham hadley at rice.edu
Sat Sep 5 16:29:01 CEST 2009


On Sat, Sep 5, 2009 at 6:15 AM, Andrew Piskorski<atp at piskorski.com> wrote:
> On Fri, Sep 04, 2009 at 08:39:12AM -0500, Hadley Wickham wrote:
>
>> When developing a package, it's often useful to be able to reload it,
>> without re-installing, re-starting R and re-loading.
>
> Why would you ever need to restart R in such a situation?

Two comments:

 * running install is slower than just sourcing all the code

 * detach specifically warns against the use you make of it: "So
detaching and re-attaching a package may not refresh some or all
components of the package, and is inadvisable."

But if it works for you, great!

> I'm not sure whether the detach() will play nicely with package
> dependencies, as I've found them annoying in other circumstances and
> so tend to never use package dependencies in my code.

This seems a bit extreme!

Hadley

-- 
http://had.co.nz/



More information about the R-devel mailing list