Update an existing workflowr project to workflowr 1.0.

wflow_update(dry_run = TRUE, project = ".")

Arguments

dry_run

logical (default: TRUE). Preview the files to be updated.

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. Here's how to update an existing project to workflowr 1.0:

# Preview the files that will be updated
wflow_update()
# Update the files
wflow_update(dry_run = FALSE)
# Preview the updates
wflow_build()
# Publish the updates
wflow_publish("_workflowr.yml", "Update to 1.0", all = TRUE)

Currently wflow_update checks for the following items:

  • Adds the site generator site: workflowr::wflow_site to index.Rmd

  • Replaces html_document with workflowr::wflow_html in _site.yml and the YAML header of the R Markdown files

  • Deletes analysis/chunks.R

  • Removes the imported chunks in the R Markdown files

  • Adds a _workflowr.yml file, but does not change any of the options (so that your site will continue to produce the same results)

  • Removes the workflowr line from include/footer.html (this is now inserted automatically by wflow_html)

Examples

# NOT RUN {
# Preview the files to be udpated
wflow_update()
# Update the files
wflow_update(dry_run = FALSE)
# }