Assume that I have been developing an R package while strictly tracking dependencies via a file e.g. mypackageR-package.R which may look something like this:
#' @keywords internal
#' @importFrom dplyr filter mutate select arrange
"_PACKAGE"
In the next development iteration I change the code and thus become completely independent of e.g. dplyr::arrange(). In such cases I would like to remove the dependency since it is no longer required and I only want to track what I really need.
Is there an "automatic" way to figure out which dependencies are unused by the current setup/code base of a package?