powered by
Replace Suffix
repl_suff(x, suff, repl)
character
character; string to change
character; suffix to replace
character; suffix to replace with
x <- c('pop', 'pop_2020_est', 'pop_white_2020', 'pop_black_2020') repl_suff(x, '_2020', '_20')
Run the code above in your browser using DataLab