From hadley at rice.edu  Sat Sep  5 16:29:01 2009
From: hadley at rice.edu (Hadley Wickham)
Date: Sat, 5 Sep 2009 09:29:01 -0500
Subject: [Rd] Load a package without installing it
In-Reply-To: <20090905111511.GA47877@piskorski.com>
References: <f8e6ff050909040639r35659a8hd00d06901093dcd1@mail.gmail.com> 
	<20090905111511.GA47877@piskorski.com>
Message-ID: <f8e6ff050909050729k51ee4e98sf0aee4433d7d101b@mail.gmail.com>

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/



[Rd] Load a package without installing it
Hadley Wickham