How can I check if a function from a package is actually being used?

I am currently editing an R script that was written by someone else and a lot of packages are loaded into the library (). I noticed that some of these packages are never used as there are no function or method calls from those specific packages. Since I am trying to clean up the code, I wondered if there is a programmatic way to check if a package is in use or not (at least one function from that package is called once)?

+3


source to share





All Articles