Skip to content
Prev 85555 / 398503 Next

inserting one backslash

On 1 Feb 2006, mailing-lists at rhkoning.com wrote:

            
I think you are on the right track with the second pattern "\\\\%".
There is a difference between what print(s) will display and what
cat(s) will display.
[1] "income 0\\%-33\\%"
income 0\%-33\%  

The string "\\" in R contains one character (see nchar()), not two.  
It can be confusing.

HTH,

+ seth