Skip to contents

Update all packages in an existing slushy environment.

Usage

slushy_update(
  date = NULL,
  project = NULL,
  config = get_config(),
  restart = TRUE
)

Arguments

date

CRAN snapshot date to use for packages. If NULL, today's date will be used.

project

The project directory. If NULL, defaults to the nearest parent directory that contains an `.Rproj` file relative to the current working directory.

config

List of configuration options. If not provided, defaults to reading from default settings in config file included in slushy package.

restart

Restart session after environment is updated? Defaults to TRUE.

Value

This function is called for its side effects.

Details

This function will update all packages according to the closest CRAN snapshot date to the one supplied. Updates can occur forward or backward, depending on whether the project is transitioning to a newer or older snapshot. The lockfile will be updated following any updates.

Examples

if (FALSE) { # \dontrun{

 # default
 slushy_update()

 # pass options
 slushy_update(date = "2022-09-01")
} # }