Skip to content
Prev 85552 / 398503 Next

inserting one backslash

RH Koning wrote:
Actually, you got the answer. See the difference between:

 > gsub("%","\\\\%","income 0%-33%")
[1] "income 0\\%-33\\%"
 > cat(gsub("%","\\\\%","income 0%-33%"))
income 0\%-33\%

HTH,

--sundar