-
Notifications
You must be signed in to change notification settings - Fork 57
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
Using if_else() results in error 'could not find function "fifelse"' #122
Comments
Try installing the latest version of data.table and see if works then? |
Although my installed But, after restarting, the issue remains.. |
It definitely works for me: library(dtplyr)
library(dplyr, warn.conflicts = FALSE)
mtcars %>%
lazy_dt() %>%
select(gear) %>%
mutate(gear2 = if_else(gear == 4, 10, gear)) %>%
as_tibble()
#> # A tibble: 32 x 2
#> gear gear2
#> <dbl> <dbl>
#> 1 4 10
#> 2 4 10
#> 3 4 10
#> 4 3 3
#> 5 3 3
#> 6 3 3
#> 7 3 3
#> 8 4 10
#> 9 4 10
#> 10 4 10
#> # … with 22 more rows I'm not sure what's going on. Any ideas @MichaelChirico? |
As pointed out by batpigandme in a related issue (#123 (comment)) the solution is to add After re-reading your blog I noticed I missed this advice:
Sorry for overlooking this and thx for your help! |
would it make sense to detect data.table isn't loaded & include it in the lazy execution message? |
Or possibly inject the data table functions we use directly into the evaluation environment. |
@hadley also might want to bump the |
For the injection part, I guess that's what's happening already for other |
Yeah, I think I just forgot about that |
I just installed
dtplyr
version 1.0.0 and it works like a charm. Unfortunately, when using thedplyr::if_else()
function, it fails with the error messagecould not find function "fifelse"
.The text was updated successfully, but these errors were encountered: