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
Using the .data pronoun in filter, mutate, and transmute does not work with database tables
library(dplyr)
con<-DBI::dbConnect(RSQLite::SQLite(), ":memory:")
copy_to(con, mtcars)
mtcars2<- tbl(con, "mtcars")
### Using mutate# works
mutate(mtcars, foo=.data$cyl)
# also works
mutate(mtcars2, foo=cyl)
# doesn't
mutate(mtcars2, foo=.data$cyl)
# Error: Column `cyl` not found in `.data`### Using transmute# works
transmute(mtcars, blah=.data$cyl)
# also works
transmute(mtcars, blah=cyl)
# doesn't
transmute(mtcars2, blah=.data$cyl)
# Error: Column `cyl` not found in `.data`### Using transmute to select# works
transmute(mtcars, .data$cyl)
# also works
transmute(mtcars2, cyl)
# doesn't
transmute(mtcars2, .data$cyl)
# Error: Column `cyl` not found in `.data`# select doesn't have this issue, this works
select( mtcars2, .data$cyl )
### Using filter# works
filter( mtcars, .data$cyl>4 )
# also works
filter( mtcars2, cyl>4 )
# doesn't
filter( mtcars2, .data$cyl>4 )
# Error: Column `cyl` not found in `.data`
(I actually ran into this when running code with a Postgres database, so it isn't DB-specific)
This is different from issue#3370, since everything works without the .data pronoun, but might be somehow related.
The text was updated successfully, but these errors were encountered:
sverchkov
changed the title
Using .data pronoun in mutate and transmute does not work with DBI
Using .data pronoun in filter, mutate and transmute does not work with DBI
Jul 20, 2018
sverchkov
changed the title
Using .data pronoun in filter, mutate and transmute does not work with DBI
Using .data pronoun in filter, mutate, and transmute does not work with DBI
Jul 20, 2018
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
lockbot
locked and limited conversation to collaborators
Jan 17, 2019
This issue was closed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using the .data pronoun in filter, mutate, and transmute does not work with database tables
(I actually ran into this when running code with a Postgres database, so it isn't DB-specific)
This is different from issue#3370, since everything works without the .data pronoun, but might be somehow related.
The text was updated successfully, but these errors were encountered: