Hi Lluís,
Just wanted to add to the discussion that it would be good to consider
users that are disconnected or behind a firewall and are installing the
package from file.
An option to point the package to a separately downloaded file would be
useful.
best
Vladimir Dergachev
On Thu, 2 Jan 2025, Lluís Revilla wrote:
Hi list,
I am developing a package that will download some data, and I'd like
to store it locally to not recalculate it often.
The CRAN policy requires tools::R_user_dir to be used and "the
contents are actively managed (including removing outdated material)"
or using TMPDIR but "such usage should be cleaned up".
When loading a package there is .onLoad or .onAttach to fill or check
those files and other settings required for a package. Is there
something for when a package is removed?
I found some related functions like .Last or reg.fnalizer and setHook
or packageEvent but they are about closing a session or don't have a
specific event for when uninstalling packages via (remove.packages). I
appreciate any feedback, thanks in advance.
Best wishes and a happy new year,
Lluís
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel