package_set_add()
Add a package set to the project
Adds a package set's packages to an existing project. Packages the project already lists are left as they are. The rest are recorded as package_add() records them, with each package's source, repository, and auto-attach setting from the set. Sets also stack at creation with new_project(package_sets = ...). As with package_add(), the Installed Packages section of the project's AI context file is then rewritten.
Usage
package_set_add(set, install = TRUE)
Arguments
| Name | Default | Description |
|---|---|---|
| set |
Package set id or Framework Cloud handle. |
|
| install | TRUE |
Logical. Install the added packages now. Default TRUE. A failed install leaves the package recorded and warns. |
Value
Invisibly, a list with added and present: the names of the packages added and those the project already listed.
Details
A set is one of Framework's built-in sets for R, such as "tidyverse-analysis" or "bayes-r". See package_sets_list(). When you are signed in to Framework Cloud, a handle such as "@yourname/lab-tools" adds one of your account's sets.
Examples
Not run
if (FALSE) {
package_set_add("bayes-r")
package_set_add("tidy-omop", install = FALSE)
}