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) ? Thanks! Ralf. ______________________________________________ R-help@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.