On Tue, May 6, 2014 at 11:53 AM, Jerome MARQUET
wrote:
> Hello,
>
> I am building a package "myModule" and would like to define a function
> that will be called when R is exited.
>
> So I defined a function
>
> *RcppExport void R_unload_mlxComputeR(DllInfo *info)*
> *{*
> *// Do sthg*
> *}*
>
I believe you're looking for `.Last`. Unfortunately there's no way to
set `on.exit(...)` for the global environment.
>From the ?quit documentation:
Immediately before terminating, .Last() is executed if the function
.Last exists and runLast is true. If in interactive use there are
errors in the .
Hello,
I am building a package "myModule" and would like to define a function
that will be called when R is exited.
So I defined a function
/RcppExport void R_unload_mlxComputeR(DllInfo *info)//
//{//
//// Do sthg//
//}//
/
and I observe that it is called when dyn.unload(