[R] How to de-source and re-source a file?

Duncan Murdoch murdoch.duncan at gmail.com
Tue Dec 6 19:17:04 CET 2011

On 06/12/2011 1:10 PM, Michael wrote:
> i.e. how to make sure the function that was loaded into workspace/memory is
> the version that I edited latest... not some stale version...
> This might solve some of my breakpoint and browser/debug problem, even the
> RStudio problem that I've met....

You can use rm() to remove a function.

You can also quit and restart R, making sure that it *does not* load an 
existing workspace (by deleting the .Rdata file if it exists, and never 
answering "yes" to the question to save it.)  This gives you a nice 
clean slate.

Duncan Murdoch

More information about the R-help mailing list