sqldf
sqldf copied to clipboard
Spurious warnings
Recent versions of RSQLite cause spurious warnings when statements other than select are used in the SQL statement. (e.g. update, delete, insert, etc.)
Can use this to muffle the offending warnings without affecting other warnings.
sqldf2 <- function(...) {
withCallingHandlers(sqldf(...), warning =
function(w) if (grepl("SQL statements must be issued with dbExecute", w))
invokeRestart("muffleWarning") else w)
}
sqldf2(...sql statement...)