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
Could not find function "lead" with latest version of dplyr #3456
Comments
Thanks for the report, this is really important to fix before release. Could you please create a reproducible example that uses a small toy dataset or a commonly available one? |
Hi, It looks as though this is as simple as:
Fails.
Works. |
Thanks. I can't run your first example, I'm seeing: test <- tibble::tibble(foo = c(1,2,3))
test <- dplyr::mutate(test, bar = dplyr::lead(.data$test, n = 1, default = -1))
#> Error in mutate_impl(.data, dots): Evaluation error: Column `test` not found in `.data`.
Also, for the second example I'm seeing: test <- tibble::tibble(foo = c(1,2,3))
dplyr::lead(test, n = 1, default = -1)
#> # A tibble: 3 x 1
#> foo
#> * <dbl>
#> 1 -1.
#> 2 NA
#> 3 NA
What do you expect |
Apologies - that first example should be:
On dplyr 0.7.4 you get:
Output from dplyr 0.7.4.9002:
|
Thanks, confirmed: @romainfrancois: Could you please take a look? |
…oses #3456 I had to copy and slightly change findFun, because the one from the R api would potentially lead to C++ destructors not being called.
Just followed the thread (#3456). Don't think the current fixes address the above? Certainly I can still produce the original error that led me to the report with the latest version of dplyr (pulled from GitHub just now). Just tested with the reprex and I still see the same too. |
@md0u80c9 did you try with the install_github( "tidyverse/dplyr", ref = "fix-issue-3456" ) |
Tested with that branch now - and that seems to work both on the reprex and on my original code. Great stuff :-). |
Thanks for taking the time to try it. Just for the record, a commit message in the branch would have closed the issue automatically on merge. Not a big deal because we usually merge fast, but potentially a problem on others repos. Thanks again for reporting the problem in the first place. |
Reopening, will close when PR is merged. |
- The hybrid evaluator finds functions from dplyr even if dplyr is not attached (#3456).
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/ |
Hi all,
The following line of code works perfectly in the stable version of dplyr. In the development version however (with the newer version of bindrcpp) this generates an error:
Error in mutate_impl(.data, dots) : could not find function "lead"
I'm not aware of lead being affected by the tidy select changes so is the function being parsed differently in some way?
The text was updated successfully, but these errors were encountered: