I have a few columns where the value is for example : 525K or 1.1M. I want to convert those values to thousand or millions as numerics without using an extra R package besides baser and tidyr.
Is there anyone who can help me with a code or a function how I can do this in a simple and quick way?
I have tried to do it by hand with removing the 'M' or 'K' and the '.'.
players_set$Value <- gsub(pattern = "M", replacement = "000000 ",
x = players_set$Value, fixed = TRUE)