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 Alas
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 initia
Hello, all
I'm trying to process the names of the variables in the US Census
database, that I'm retrieving with tidycensus. My end goal is to produce
nicely formatted tables with natural labels.
The labels as downloaded from the US Census look like this:
## Get the P1 table for block group 3 i
4 matches
Mail list logo