You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error in sqliteSendQuery(con, statement, bind.data) :
error in statement: wrong number of arguments to function LOG()
Here is is my findings when I was investigating this:
translate_sql() accepts log(Sepal.Length,exp(1)) as valid, but doesn't accept log(Sepal.Length). It gives the same error message as example 1
If I directly use RSQLite::dbGetQuery (a separate SQLite database, with iris loaded) with the following SQL statement SELECT LOG([Sepal.Length]) FROM [iris], it works as expected, after calling initExtension on the connection object
dplyr calls initExtension inside src_sqlite function call, so it should work the same as RSQLite::dbGetQuery
It looks like the extension loaded into SQLite has a log function, but it only accepts one argument, the column to apply the function to. But dplyr expects the log function to have 2 arguments, conflicting with what SQLite expects
I am just wondering whether this is a bug or I'm doing this incorrectly
I tested and got those error messages on Mac OS X 10.10.4, Windows 7 64-bit, and Windows 10 64-bit, using R v3.2.1 64-bit, dplyr v0.4.2, RSQLite v1.0.0. Here is my sessionInfo dump on my Mac
> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.4 (Yosemite)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_0.4.2
loaded via a namespace (and not attached):
[1] lazyeval_0.1.10 magrittr_1.5 R6_2.0.1 assertthat_0.1 parallel_3.2.1
[6] DBI_0.3.1 tools_3.2.1 Rcpp_0.11.6 RSQLite_1.0.0 nycflights13_0.1
The text was updated successfully, but these errors were encountered:
I'm having issues using the log function in
mutate
when the source is connect to a SQLite backendExample 1
Error Message
Example 2
Error Message
Here is is my findings when I was investigating this:
translate_sql()
acceptslog(Sepal.Length,exp(1))
as valid, but doesn't acceptlog(Sepal.Length)
. It gives the same error message as example 1RSQLite::dbGetQuery
(a separate SQLite database, withiris
loaded) with the following SQL statementSELECT LOG([Sepal.Length]) FROM [iris]
, it works as expected, after callinginitExtension
on the connection objectdplyr
callsinitExtension
insidesrc_sqlite
function call, so it should work the same asRSQLite::dbGetQuery
It looks like the extension loaded into SQLite has a log function, but it only accepts one argument, the column to apply the function to. But
dplyr
expects the log function to have 2 arguments, conflicting with what SQLite expectsI am just wondering whether this is a bug or I'm doing this incorrectly
I tested and got those error messages on Mac OS X 10.10.4, Windows 7 64-bit, and Windows 10 64-bit, using
R v3.2.1 64-bit
,dplyr v0.4.2
,RSQLite v1.0.0
. Here is mysessionInfo
dump on my MacThe text was updated successfully, but these errors were encountered: