Ivan and Bert, thank you so much for your help.
Ivan, your solution worked perfectly. I didn't really understand how to
do string processing on a vector of strings, and your solution
demonstrated it for me. I modified it to work with the tidyverses'
stringr library in this way:
bg3_race_sum
I probably misunderstand what you want to do, but for:
test <- c(" !!Total:",
" !!Total:!!Population of one race:",
" !!Total:!!Population of one race:!!White alone",
" !!Total:!!Population of one race:!!Black or African American alone",
" !!Total:!!Population of one race:!!American Indian and
On Wed, 28 Jun 2023 20:29:23 +
Kevin Zembower via R-help wrote:
> I think my algorithm for the labels is:
> 1. keep everything from the last "!!" up to and including the last
> character
> 2. for everything remaining, replace each "!!.*:" group with a single
> space.
If you remove the
3 matches
Mail list logo