I would like to have to separate columns from this data frame one for price value the other one for currency using R regular expression. I have tried
df = 50, 000 USD, 40,000 EUR, 8,500 GBP
df %>%
select(price) %>%
mutate(priceValue = str_replace(price, "\\w+$", ""),