Search R scripts for packages that are required.
deps(path = ".", base = FALSE, installed = TRUE, available = TRUE,
list = FALSE)
a directory or file containing R scripts.
whether to include base packages in the output.
whether to include installed packages in the output.
whether to include available packages in the output.
whether to return packages in list format, split by script.
Names of packages as a vector, or in list format if list=TRUE
. If no
dependencies are found, the return value is NULL
.
installed.packages
, available.packages
.
icesTAF-package
gives an overview of the package.
# NOT RUN {
dir <- system.file(package="MASS", "scripts")
script <- system.file(package="MASS", "scripts/ch08.R")
deps(script) # dependencies
deps(script, base=TRUE) # including base packages
deps(script, installed=FALSE) # not (yet) installed
deps(dir)
deps(dir, list=TRUE)
deps(dir, available=FALSE) # dependencies that might be unavailable
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab