How to check if a function from a package is actually used?

Viewed 1424

I'm currently editing an R script that was written by someone else, and a lot of packages are loaded in using library(). I've noticed that some of these packages are never used, as there are no calls to functions or methods from those particular packages. As I'm attempting to clean up the code, I wondered if there is a programmatic way to check if a package is used or not (at least one function from that package is called once)?

0 Answers
Related