[R] Printing a single "\" character

From: Firas Swidan <firas_at_cs.technion.ac.il>
Date: Wed 20 Apr 2005 - 01:57:56 EST


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.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Apr 20 02:01:59 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:17 EST