I have a large vector of strings of the form:
Input = c(\"1,223\", \"12,232\", \"23,0\")
etc. That\'s to say, decimals separated by commas,
Building on @adibender solution:
input = '23,67' as.numeric(gsub( # ONLY for strings containing numerics, comma, numerics "^([0-9]+),([0-9]+)$", # Substitute by the first part, dot, second part "\\1.\\2", input ))
I guess that is a safer match...