Initialize and Maintain of {slushy} environments
maintain_env.Rmd
Setting up the environment
Please perform the following steps to set up your slushy environment.
- Install {slushy} from github:
devtools::install_github("GSK-Biostatistics/slushy")
- Create a
slushy_config.yml
inside your project directory and customize as needed:
new_config()
- Initialize your slushy environment by entering the following code in
your RStudio console. By default, this will use the “default” config in
your new
slushy_config.yml
file and today’s date for the snapshot.
[NOTE: This will create some extra files and folders for use by slushy (.Rprofile, DESCRIPTION, renv/, renv.lock)]
- [Optional] Add any extra packages needed. [NOTE: You will receive a message of caution, as these packages were not defined in the config file as agreed-upon packages.]
slushy_add("packagename")
- [Optional] Remove a package if needed.
slushy_drop("packagename")
Updating the environment
In the future, you can easily update the environment forward or backward.
# default: use latest date
slushy_update()
# revert to a prior date
slushy_update(date = "2023-01-01")