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

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


Copy link

To reproduce:

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
Copy link

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

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
Copy link

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

env <- lazyeval::common_env(.dots)


 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.
None yet
None yet

Successfully merging a pull request may close this issue.

4 participants