Is there a way to ignore case sensitvity when doing joins using dplyr? left, inner, and full?
I see it works with select but this often a huge pain for me. I know I can convert the columns toupper or tolower before hand, but this would be a helpful work around.
I don't think there's a straightforward way to get around using tolower
or toupper
to tidy the data first. That said, an inline mutate
(inside the join) would leave the original data untouched if that is preferred.
X %>% left_join(Y %>% mutate(id = tolower(id)), by = "id")
It works, but we might as well have created a tidy Y with ids to match X in the first place (in my opinion).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With