| diagnose_dependencies | R Documentation |
Scans local packages for references to the recommended packages 'Matrix' and
'class', which can cause R CMD check failures when they are used implicitly
but not declared as dependencies.
diagnose_dependencies(packages, pkg_dir = NULL, ext = ".tar.gz")
packages |
Character vector. Archive paths or stems to examine, e.g.
|
pkg_dir |
Character. Directory or directories containing local archives
( |
ext |
Character. Archive extension. Defaults to |
Extracts and scans the R source of each package for patterns that suggest
implicit use of 'Matrix' or 'class'. Useful for debugging R CMD check errors
such as "there is no package called 'Matrix'" even when the package does not
appear to use it directly.
A named list with one entry per local package, each a list with two elements:
Character vector of references to 'Matrix', with file and line.
Character vector of references to 'class', with file and line.
archives <- system.file("extdata", package = "bigbang")
res <- diagnose_dependencies(
packages = "toycomponent_0.1.0",
pkg_dir = archives
)
res[["toycomponent_0.1.0"]]
lapply(res, function(x) x$matrix_refs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.