Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter_ with a data.table throws 'argument ".dots" is missing, with no default' error #906

Closed
richierocks opened this issue Jan 19, 2015 · 3 comments · Fixed by #1072
Closed
Milestone

Comments

@richierocks
Copy link

To reproduce:

library(data.table)
library(dplyr)
DT <- data.table(x = rnorm(10))
DT %>% filter_(~ x > 0)
## Error in lazyeval::common_env(.dots) : 
##   argument ".dots" is missing, with no default

The error persists if you replace the formula with a string or call:

DT %>% filter_("x > 0")       # throws same error
DT %>% filter_(quote(x > 0))  # throws same error

...and if you don't use piping:

filter_(DT, ~ x > 0)          # throws same error

The interactive version is OK:

DT %>% filter(x > 0)          # OK
@richierocks richierocks changed the title filter_ a with data.table throws 'argument ".dots" is missing, with no default' error filter_ with a data.table throws 'argument ".dots" is missing, with no default' error Feb 18, 2015
@jakesherman
Copy link

I am having the same issue. filter_ wasn't working with data.table, but works as intended for data.frame

@paljenczy
Copy link

Confirmed, same behavior here. Using dplyr 0.4.1 and data.table 1.9.4.

@hadley hadley added this to the 0.5 milestone May 19, 2015
@richierocks
Copy link
Author

Just had another look at this, and it's an easy fix. In filter_.data.table, change the second line

env <- lazyeval::common_env(.dots)

to

 env <- lazyeval::common_env(dots)

@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants