Hello,
The following code used to work in dplyr (not too long ago) but not with the latest one here. Did I miss something?
Thanks!
library(dplyr)
### used to work
iris %>%
mutate(Species2 = Species,
Species2 = paste0(Species2, ":~", Sepal.Width))
#> Error: `mutate()` argument `Species2` errored.
#> i `Species2` is `paste0(Species2, ":~", Sepal.Width)`.
#> x object 'Species2' not found
Created on 2020-03-17 by the reprex package (v0.3.0)
Thanks @tungmilan! This is obviously a bug. Here's a slightly more minimal reprex:
library(dplyr, warn.conflicts = FALSE)
df <- data.frame(x = 1, y = 2)
df %>% mutate(x2 = x, x3 = x2 + 1)
#> Error: `mutate()` argument `x3` errored.
#> ℹ `x3` is `x2 + 1`.
#> x object 'x2' not found
df %>% mutate(x2 = x + 0, x3 = x2 + 1)
#> x y x2 x3
#> 1 1 2 1 2
Created on 2020-03-17 by the reprex package (v0.3.0)
@romainfrancois this looks related to the symbol only stuff you were working on recently.
Most helpful comment
Thanks @tungmilan! This is obviously a bug. Here's a slightly more minimal reprex:
Created on 2020-03-17 by the reprex package (v0.3.0)
@romainfrancois this looks related to the symbol only stuff you were working on recently.