[R] Searching for a string in RSQLite

hadley wickham h.wickham at gmail.com
Thu Nov 25 18:33:21 CET 2004

> You may find dQuote() and sQuote() to be helpful, but a better

Ooops, dQuote() and sQuote() won't be of much use as they escape
quotes with quotes.

A regular expression should do the trick: gsub("'", "\\\\'", "Hi
y'all").  (Note that this looks like it has too many backslashes, but
this is just the way R prints escaped strings, use str() to see the
unescaped string)


More information about the R-help mailing list