Newer versions of workflowr sometimes make changes that need to be
coordinated across multiple files. After upgrading workflowr, run
wflow_update
to make all the necessary changes.
wflow_update(dry_run = TRUE, commit = TRUE, log_file = NULL, log_open = interactive(), project = ".")
dry_run | logical (default: TRUE). Preview the proposed updates. |
---|---|
commit | logical (default: TRUE). Commit the updated files (only files
tracked by Git are included in commit). Only executed if |
log_file | character (default: NULL). A file to save the log messages. If NULL, a temporary file is created. |
log_open | logical (default: |
project | character (default: ".") By default the function assumes the current working directory is within the project. If this is not true, you'll need to provide the path to the project directory. |
A character vector of the updated files.
By default, wflow_update
is run in dry_run
mode so that no
unwanted changes are made. The log file contains the changes to each file,
represented with the syntax from the
Unix diff utility.
After reviewing the log file for the proposed changes, re-run the function
with dry_run = FALSE
to implement them.
Currently wflow_update
checks for the following items:
Updates the shared chunks in analysis/chunks.R
.
Updates each R Markdown file in analysis/
to use the shared
chunks. This is implemented with wflow_convert
.
Removes the "BuildType: Website" from the Rproj file. This re-builds
every R Markdown file everytime, so it is safer to always use
wflow_build
.
not_run({ # Preview the potential changes wflow_update() # Incorporate the changes wflow_update(dry_run = FALSE) })