Skip to contents

Use it to start working on a project created with g6tr_setup().

This function executes 4 sub-steps:

  1. renv prompt Will run renv::status() and if project library is not synchronized with renv.lock file, will show a prompt to choose either renv::snapshot() or renv::restore(), or just skip.

  2. attach packages Will attach all the packages listed in project's DESCRIPTION file.

  3. resolve conflicts Will load the conflicted library and resolve a set of locally defined conflicts.

  4. source r Will source all scripts located in the "R" subfolder of the project folder.

Each of the steps can be turned off by switching the corresponding parameter.

Usage

g6tr_project_continue(
  renv_prompt = interactive(),
  attach_packages = TRUE,
  resolve_conflicts = TRUE,
  source_r = TRUE,
  project = "."
)

Arguments

renv_prompt

If TRUE (default), will run renv::status() and if project library is not synchronized with renv.lock file, will show a prompt to choose either renv::snapshot() or renv::restore(), or just skip.

attach_packages

If TRUE (default), will attach (call library()) all the packages listed in project's DESCRIPTION file.

resolve_conflicts

If TRUE (default), will load the conflicted library and resolve a set of locally defined conflicts. Update the conflicts in the root directory of your monorepo if you want to change this for future projects.

source_r

If TRUE, will source all scripts located in the "R" subfolder of the project folder. But if "R" subfolder does not exist or if it does not contain any "*.R" scripts, it won't show any notifications.

project

Path to a project. By default it is current working directory.

Examples

if (FALSE) { # \dontrun{
# default use case
g6tr_project_continue()

# when you give up fighting with renv and just want load all the other things
g6tr_project_continue(renv_prompt = FALSE)
} # }