Re: [Rd] hook for when R quits

From: Jeffrey Ryan <>
Date: Fri, 11 Mar 2011 12:19:33 -0600

Take a look at reg.finalizer. You'd have to create an object internally that would persist until R exits - and a related function to handle cleanup of course.


On Fri, Mar 11, 2011 at 12:08 PM, Michael Lawrence <> wrote:
> Hi,
> Is there any way that a package can listen for when R quits? The Qt stuff is
> hooking into platform-specific event loops and when those die unexpectedly
> (from the perspective of Qt), it aborts, causing an annoying error dialog.
> If we could catch when R is killed, we could cleanup, like we do with
> .onUnload.
> Thanks,
> Michael
>        [[alternative HTML version deleted]]
> ______________________________________________
> mailing list

Jeffrey Ryan

______________________________________________ mailing list
Received on Fri 11 Mar 2011 - 18:23:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 Mar 2011 - 19:00:29 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive