repl_pref: Replace Prefix

View source: R/prefix.R

repl_prefR Documentation

Replace Prefix

Description

Replace Prefix

Usage

repl_pref(x, pref, repl)

Arguments

x

character; string to change

pref

character; prefix to replace

repl

character; prefix to replace with

Value

character

Examples

x <- c('pop', 'pop_2020_est', 'pop_white_2020', 'pop_black_2020')
repl_pref(x, 'pop_', 'p_')

name documentation built on Sept. 9, 2025, 5:35 p.m.