wflow_rename_proj: Rename a workflowr project

View source: R/wflow_rename_proj.R

wflow_rename_projR Documentation

Rename a workflowr project

Description

If you want to rename an existing workflowr project, use wflow_rename_proj to update the name throughout all the project files.

Usage

wflow_rename_proj(
  name,
  rproj = TRUE,
  remote = TRUE,
  navbar = TRUE,
  readme = TRUE,
  commit = TRUE,
  directory = TRUE,
  project = "."
)

Arguments

name

character. The new name for the workflowr project.

rproj

logical (default: TRUE). Rename the RStudio Project file.

remote

logical (default: TRUE). Rename the remote URL.

navbar

logical (default: TRUE). Rename the navbar title.

readme

logical (default: TRUE). Rename the README title.

commit

logical (default: TRUE). Commit the changes to Git.

directory

logical (default: TRUE). Rename the project directory.

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.

Details

wflow_rename_proj performs the following steps and then commits the changes:

  • Rename RStudio Project file (.Rproj)

  • Update URL of remote repository (see wflow_git_remote)

  • Update project name in the navigation bar (defined in _site.yml)

  • Update title of README file

  • Rename the project directory itself

After renaming the project with wflow_rename_proj, you should republish the R Markdown files with wflow_publish(republish = TRUE). Also, you should go to the settings of your Git repository on the online Git hosting platform to change its name.

Value

Invisibly returns the path to the project directory

See Also

wflow_publish

Examples

## Not run: 

wflow_rename_proj("new-project-name")

## End(Not run)


jdblischak/workflowr documentation built on Nov. 26, 2024, 5:14 p.m.