[R] Printing a single "\" character

Firas Swidan firas at cs.technion.ac.il
Tue Apr 19 17:57:56 CEST 2005


Hi,
I have a small R question: how to print a single "\" character? I have the
following results:
> print("\") does not work

> print("\\")
[1] "\\"

I need to make the following substitution as well, but it does not work
either:
> sub("_","\_","g_g")
[1] "g_g"

Thanks in advance,
Firas.




More information about the R-help mailing list