I am trying to remove all the period characters (.) from a data.table using gsub. Unfortunately, it isn't working. How do you propperly express the pattern to describe the periods to then replace them by nothing?
My code:
dt[, Address := gsub(".", "", Address)]
Result:
head(dt$Address)
[1] "" "" "" "" "" ""
I'm guessing that when pattern = "." R thinks I'm refering to the entire content of the object in question. What am I doing wrong?