I have a dataframe L with column price that I store in variable pr. I want to remove the "$" from the price column and then turn it into numeric. How do I do this please? I tried as followed.
This is my column before:
I tried this code:
pr = L$price
pr <- gsub("$", "", pr)
pr
But, instead of removing "$", it adds "" to the data
Could you please let me know how I can do this? Thank you in advance.