Searching for a string in RSQLite
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)
Hadley