tidyr and tidyeval

Created on 18 Apr 2017  路  9Comments  路  Source: tidyverse/tidyr

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)

Most helpful comment

tidyr hasn't been ported to tidyeval yet, but it's on the todo list.

All 9 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hadley picture hadley  路  6Comments

coatless picture coatless  路  6Comments

pachadotdev picture pachadotdev  路  3Comments

davidhunterwalsh picture davidhunterwalsh  路  4Comments

earowang picture earowang  路  9Comments