select()
and gather()
work nicely with !!quo()
, whereas spread()
does not. It returns Error: Invalid column specification
. Example:
library(tidyverse)
mtcars %>%
mutate(name = row.names(.)) %>%
as_tibble() %>%
select(cyl, mpg, !!quo(name)) %>%
gather(key, value, -!!quo(name)) %>%
spread(key, !!quo(value))
versions:
dplyr * 0.5.0.9004 2017-04-18 Github (tidyverse/dplyr@68bece7)
rlang 0.0.0.9017 2017-04-18 Github (hadley/rlang@8fd2651)
tidyr * 0.6.1.9000 2017-04-18 Github (tidyverse/tidyr@41ac9cc)
tidyr hasn't been ported to tidyeval yet, but it's on the todo list.
Any ETA on this?
I'm working on it right now ;)
ETA today or tomorrow
here it is. You're welcome to test it:
devtools::install_github("lionel-/tidyr", ref = "port-rlang")
Yeah! Seems to work in my test that failed me before. Thanks!
Now merged on master.
Hi, I'm facing the same issue although I have updated my packages. Could you please help?
Thanks!
devtools::install_github("tidyverse/tidyr")
, or wait next week when it's on CRAN.
Most helpful comment
tidyr hasn't been ported to tidyeval yet, but it's on the todo list.