[Rd] gsub + backslashes

From: Torsten Hothorn <Torsten.Hothorn_at_rzmail.uni-erlangen.de>
Date: Mon 24 Apr 2006 - 14:23:20 GMT

Dear developeRs,

I thought that backslashes can be escaped in the usual way (and I think I did this before) but I can't see why

R> gsub("\\", "x", "\alpha")
Error in gsub(pattern, replacement, x, ignore.case, extended, fixed, useBytes) :

         invalid regular expression '\'

gives an error. Or am I just blind?



R> version

platform       i686-pc-linux-gnu
arch           i686
os             linux-gnu
system         i686, linux-gnu
status         Under development (unstable)
major          2
minor          4.0
year           2006
month          04
day            18
svn rev        37840
language       R

version.string R version 2.4.0 Under development (unstable) (2006-04-18 r37840)

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Apr 25 00:25:34 2006

This archive was generated by hypermail 2.1.8 : Mon 24 Apr 2006 - 16:17:57 GMT