Session - {stringr}
A natural step to searching for long strings is to consider searching by key words
See what happens when negate is changed to TRUE
Quite often data has trailing spaces but using {readr}, interestingly, corrects this!
This data set has had trailing white space added to the beginning of the name and afterwards:
# A tibble: 6 × 5
Ethnicity `%` Headcount %.working.age.population.(201…¹ trimmed_name
<chr> <dbl> <dbl> <dbl> <chr>
1 " Asian " 10 118396 7.2 Asian
2 " Black " 6.1 72321 3.4 Black
3 " Chinese " 0.6 6536 0.9 Chinese
4 " Mixed " 1.7 20607 1.8 Mixed
5 " White " 79.2 934544 85.6 White
6 "Other" 2.3 27169 1.1 Other
# ℹ abbreviated name: ¹`%.working.age.population.(2011)`