powered by
Remove Suffix
rem_suff(x, suff)
character
character; string to change
character; suffix to remove
x <- c('pop', 'pop_2020_est', 'pop_white_2020', 'pop_black_2020') rem_suff(x, '_2020')
Run the code above in your browser using DataLab