My question was from replacing a pattern by '\\'. How to replace '/' in string by '\'?
string='abc/efg' gsub('/','\\',string) On Sun, Nov 15, 2009 at 5:07 PM, David Winsemius <dwinsem...@comcast.net> wrote: > ?cat > >> cat("\\") > \ > > > On Nov 15, 2009, at 5:30 PM, Peng Yu wrote: > >> I can not get the string '\'. Could somebody let me know how to get it? >> >>> print('\') >> >> + >> + >>> >>> print('\\') >> >> [1] "\\" >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > David Winsemius, MD > Heritage Laboratories > West Hartford, CT > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.