| Type: | Package | 
| Title: | Dependency Management with 'roxygen'-Style Comments | 
| Version: | 0.4.0 | 
| Description: | Manage your source code dependencies by decorating your existing R code with special, 'roxygen'-style comments. | 
| License: | MIT + file LICENSE | 
| LazyLoad: | yes | 
| Imports: | renv, jsonlite, remotes | 
| RoxygenNote: | 7.3.1 | 
| Encoding: | UTF-8 | 
| BugReports: | https://github.com/analythium/deps/issues | 
| URL: | https://hub.analythium.io/deps/, https://github.com/analythium/deps | 
| Language: | en-US | 
| NeedsCompilation: | no | 
| Packaged: | 2024-07-07 14:44:32 UTC; Peter | 
| Author: | Peter Solymos  | 
| Maintainer: | Peter Solymos <peter@analythium.io> | 
| Repository: | CRAN | 
| Date/Publication: | 2024-07-07 15:00:02 UTC | 
deps: Dependency Management with 'roxygen'-Style Comments
Description
Manage your source code dependencies by decorating your existing R code with special, 'roxygen'-style comments.
Author(s)
Maintainer: Peter Solymos peter@analythium.io (ORCID)
Other contributors:
Analythium Solutions Inc. [copyright holder, funder]
See Also
Useful links:
Report bugs at https://github.com/analythium/deps/issues
Create a Dependencies JSON File
Description
Discover dependencies and write a dependencies.json file.
Usage
create(
  dir = getwd(),
  file = "dependencies.json",
  output = dir,
  installed = c("base", "recommended"),
  overwrite = TRUE,
  ask = TRUE
)
Arguments
dir | 
 Path to the directory where the files to be scanned are located.  | 
file | 
 The name of the file to be save, default is   | 
output | 
 Path to the directory where JSON file should be written to.  | 
installed | 
 The   | 
overwrite | 
 Logical, should the   | 
ask | 
 Logical, asking confirmation before writing the   | 
Value
Invisibly returns the list of file names that were created. The side effect is a JSON (and possibly a text for system requirements) file written to the hard drive. The function fails when there are no R related files in dir.
Examples
dir <- system.file("examples/01-basic", package = "deps")
out <- tempdir()
create(dir, output = out, ask = interactive())
cat(readLines(file.path(out, "dependencies.json")), sep = "\n")
unlink(file.path(out, "dependencies.json"))
Install Dependencies
Description
Install dependencies from an existing dependencies.json file or after discovering the dependencies.
Usage
install(
  dir = getwd(),
  file = "dependencies.json",
  upgrade = "never",
  cleanup = TRUE,
  timeout = 300L,
  ask = TRUE,
  ...
)
Arguments
dir | 
 Path to the directory where the JSON file should be written to.  | 
file | 
 The name of the file to be save, default is   | 
upgrade | 
 Should package dependencies be upgraded? Argument passed to remotes functions.  | 
cleanup | 
 Logical, clean up files created by   | 
timeout | 
 Integer, timeout for file downloads (default 60 seconds can be short).  | 
ask | 
 Logical, asking confirmation before writing the   | 
... | 
 Other argument passed to remotes functions.  | 
Value
Returns NULL invisibly. The side effect is the dependencies installed.
Examples
dir <- system.file("examples/01-basic", package = "deps")
out <- tempdir()
create(dir, output = out, ask = interactive())
cat(readLines(file.path(out, "dependencies.json")), sep = "\n")
## Not run: 
install(out)
## End(Not run)
unlink(file.path(out, "dependencies.json"))