Closed daattali closed 7 years ago
The following code is taken straight from the documentation for dplyr::do:
dplyr::do
by_cyl <- group_by(mtcars, cyl) do(by_cyl, head(., 2))
This works.
But if I try to call a filter_ inside the do function, and use a locally defined variable like this:
filter_
do
library(dplyr) by_cyl <- group_by(mtcars, cyl) do(by_cyl, { foo <- "virginica" filter_(iris, ~ Species == foo) head(., 2) })
I get error:
Error in filter_impl(.data, quo) : object 'foo' not found
This does not happen in dplyr 0.5
I haven't debugged enough to find out anything more specific, but this is a fairly isolated minimal reproducible bug.
I know that NS_ functions are now deprecated but this will break old code in packages - I assume I'm not the only one affected
This requires a fix in rlang and unfortunately rlang just got on CRAN. I'll install the fix on master tomorrow.
The following code is taken straight from the documentation for
dplyr::do
:This works.
But if I try to call a
filter_
inside thedo
function, and use a locally defined variable like this:I get error:
This does not happen in dplyr 0.5
I haven't debugged enough to find out anything more specific, but this is a fairly isolated minimal reproducible bug.
I know that NS_ functions are now deprecated but this will break old code in packages - I assume I'm not the only one affected