dependencies
This is the main element of the config file and is most commonly edited. It specifies which packages (or project dependencies) to install in your project, as well additional options to tune the installation.
There are 4 types of dependency configurations, sorted by their source, each of which have individual configurations corresponding with them.
All dependencies types have the following configurations:
install_suggestions
optional - Install the suggested dependencies of the packageDefault:
false
dependencies_only
optional - Install only the dependencies of the package, not the package itself. Used primarily for package development.Default:
false
Repository
Section titled “Repository”The most common/default type. These packages will be sourced from the CRAN-like repositories listed in the repositories section, preferring binaries unless otherwise specified.
Configurations
Section titled “Configurations”Simple
Section titled “Simple”A simple string can be listed if no configuration required for the package. These packages will be installed from the first resolvable repository.
Detailed
Section titled “Detailed”name
- The name of the packagerepository
optional - Used to specify that a package must come from a specific repository by indicating an alias corresponding to the repositories sectionDefault: first resolvable repository
force_source
optional - Force the package to be fetched as sourceDefault:
false
Example
Section titled “Example”dependencies = [ "dplyr", { name = "purrr", force_source = true }, { name = "ggplot2", repository = "CRAN" }, { name = "tibble", force_source = true, repository = "PPM" },]
Used to install packages from a git repository from either a branch, tag, or commit reference. Requires the git
CLI to be available.
Configurations
Section titled “Configurations”name
- The name of the package. Must match the name of the package found in the repositorygit
- The git repository url. Either http or SSHtag
orbranch
orcommit
- Must specify one and only one git reference.commit
must be the full git sha.directory
optional - a (sub)directory inside of the repository containing the R package, if the package is not at the repository root.Default:
None
Example
Section titled “Example”dependencies = [ { name = "git-tag", git = "https://github.com/a2-ai/git-tag", tag = "v1.0.0" }, { name = "git-commit", git = "https://github.com/a2-ai/git-commit", commit = "bc50e550e432c3c620714f30dd59115801f89995" }, { name = "git-branch", git = "https://github.com/a2-ai/git-branch", branch = "main", directory = "r" },]
Install a package from a local source. Can be a directory or archive containing a source or binary R package.
Configurations
Section titled “Configurations”name
- The name of the package. Must match the name of the package found at the path.path
- The path pointing to the package directory or archive
Example
Section titled “Example”dependencies = [ { name = "local-dir", path = "path/to/my/package", dependencies_only = true }, { name = "local-archive", path = "path/to/my/archive.tar.gz" },]
Install a source or binary package directly from a URL.
Configurations
Section titled “Configurations”name
- The name of the package. Must match the name of the package found at the url.url
- The url pointing to the package archive from which to download.
Example
Section titled “Example” { name = "dplyr", url = "https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_1.1.3.tar.gz" },