[R] .Last() and namespace

From: Ralf Tautenhahn <rtautenh_at_ipb-halle.de>
Date: Mon, 14 Jul 2008 17:46:14 +0200

Dear R-help list,

 for a package that uses Rmpi calls and a namespace,  I need to define a .Last() function to call mpi.finalize() - directly before R quits.

 The hooks like on .onUnload are not useful in this case, because they are not executed when the R session is finished.  

 The defined .Last() must be in the base namespace to be executed, is there a better way to do this than this hack :

  eval(expr=".Last" <- function() mpi.finalize(), envir = .BaseNamespaceEnv) ?



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 14 Jul 2008 - 16:20:57 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 Mon 14 Jul 2008 - 16:31:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive