Skip to content
Prev 386637 / 398503 Next

How to perform package cleanup when R session is ending?

Thank you! This solution works! I actually tried reg.finalizer but it
didn't work when it is a part of the package code,
so I thought this is not the right function. Your example is very helpful.
Putting the function inside the package
initializer makes the finalizer works as I wish. Not sure why it behaves
differently when in different locations but
this is good enough for me. Many thanks!

Best,
Jiefei

On Sat, Dec 19, 2020 at 1:09 AM Bill Dunlap <williamwdunlap at gmail.com>
wrote: