Recently, I found that there are many packages that I don't use much, and some of them may never be used again. I would like to delete these packages, but I am worrying that some packages that I often use may depend on these rarely used ones.
So I am wondering whether there is a way in R to detect how often a package is used?
Thank you!
I have never seen a package able to quantify the use of R packages.
Further, I see a risk in simply remove package, as there can be dependencies you are not aware of.
However, there is the package miniCRAN, which can show you dependencies between packages. So my suggestion would be that you scan for all your packages installed on your system and look for dependencies. In that way you could find packages which can be removed without breaking other packages even if you are using the functionality on a very rare basis.
One more recommendation is to not use system wide installed packages, but use packages dedicated to your projects. There are multiple tools which can be used in this context: renv, packrat. The goal of such approaches is to get a independent package libraries for each project. If the project is no longer in your focus you can easily remove the packages without touching the functionality of other projects,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With