You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, dependencies() will perform a static analysis of R files. I find this very useful during development as a mechanism to help build the Imports section of a package's DESCRIPTION file; e.g.:
The only problem is the static analysis skips the NAMESPACE file, which itself is based on roxygen2 tags, and includes some imports. For example, I might have the tag #' @importFrom foo bar, yielding the NAMESPACE entry:
importFrom(foo, bar)
It'd be useful if dependencies() also read the NAMESPACE file to identify additional packages.
FWIW, there's a base parseNamespaceFile() function, which can be run (here from within the nascent package's root) like so:
parseNamespaceFile("packagename", "..")
One would still need to know how to deal with the various outputs -- each type corresponding to each unique NAMESPACE directive, but fortunately new NAMESPACE directives don't come around too often :-)
The text was updated successfully, but these errors were encountered:
At present,
dependencies()
will perform a static analysis of R files. I find this very useful during development as a mechanism to help build the Imports section of a package's DESCRIPTION file; e.g.:The only problem is the static analysis skips the NAMESPACE file, which itself is based on roxygen2 tags, and includes some imports. For example, I might have the tag
#' @importFrom foo bar
, yielding the NAMESPACE entry:It'd be useful if
dependencies()
also read the NAMESPACE file to identify additional packages.FWIW, there's a base
parseNamespaceFile()
function, which can be run (here from within the nascent package's root) like so:One would still need to know how to deal with the various outputs -- each type corresponding to each unique NAMESPACE directive, but fortunately new NAMESPACE directives don't come around too often :-)
The text was updated successfully, but these errors were encountered: