local_repo_rename: Rename local directories using a vector of patterns and...

View source: R/local_repo_rename.R

local_repo_renameR Documentation

Rename local directories using a vector of patterns and replacements.

Description

This function is meant to help with renaming local student repos to include something more useful like ⁠Last, First name⁠ or a unique identifier for the purposes of ordering repository folders.

Usage

local_repo_rename(repo_dir, pattern, replacement)

Arguments

repo_dir

Character. Vector of repo directories or a single directory containing one or more repos.

pattern

Character. One or more regexp patterns to match to directory names.

replacement

Character. One or more text strings containing the replacement value for matched patterns.

Value

Returns a character vector of the new repo directory paths, or NA if the rename failed.


ghclass documentation built on May 29, 2024, 8:44 a.m.