Reputation: 109
I want to remove all dots in a df column of prices, all integers. The data:
df <- data.frame(price = c(1.800.000, 900.000, 1.500.000, ...))
I want:
price
1800000
900000
1500000
I have tried gsub('.', '', as.character(df$price))
, but I got only empty strings.
What could I do?
Upvotes: 1
Views: 1537