Skip to contents

This function will trim down the installed packages to only those that are used in the code files of the project. Unused packages will be removed from the DESCRIPTION file, uninstalled from the project library, and removed from the `renv.lock` file.

Usage

slushy_trim(
  project = NULL,
  config = get_config(config_file = "slushy_config.yml")
)

Arguments

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.

Examples

if (FALSE) { # \dontrun{

 # default
 slushy_trim()

 # pass options
 slushy_trim(config = get_config("slushy_config.yml"))
} # }