[R] Searching for a string in RSQLite
hadley wickham
h.wickham at gmail.com
Thu Nov 25 18:12:11 CET 2004
> I'd like to search for a particular string in an SQLite database using
> RSQLite, but I'm running into problems constructing the query
> properly, because of embedded quotes and parens in the string.
You may find dQuote() and sQuote() to be helpful, but a better
solution might be to ask the developers of the RSQLite package to add
R functions that call the SQLite api functions sqlite_exec_printf()
and sqlite_get_table_printf() which automatically escape single quotes
(among other things, http://www.sqlite.org/c_interface.html)
Hadley
More information about the R-help
mailing list