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


Copy link

@richierocks richierocks commented Jan 19, 2015

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

@jakesherman jakesherman commented Mar 21, 2015

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

Copy link

@paljenczy paljenczy commented Apr 12, 2015

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

@richierocks richierocks commented Jun 18, 2015

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)

@hadley hadley closed this in #1072 Aug 24, 2015
@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
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants