Learn R Programming

workflowr (version 0.11.0)

wflow_update: Update a workflowr project.

Description

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.

Usage

wflow_update(dry_run = TRUE, commit = TRUE, log_file = NULL,
  log_open = interactive(), project = ".")

Arguments

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 dry_run = FALSE.

log_file

character (default: NULL). A file to save the log messages. If NULL, a temporary file is created.

log_open

logical (default: interactive()). Should the log file be opened in RStudio? This argument is ignored if the function is not run from within RStudio.

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.

Value

A character vector of the updated files.

Details

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.

See Also

wflow_convert

Examples

Run this code
# NOT RUN {
# Preview the potential changes
wflow_update()
# Incorporate the changes
wflow_update(dry_run = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab