library(tidyr)
df<-tibble::tibble(x=1, y=2, z=3)
df %>% gather("key", "value", c(2, 3))
#> Warning in if (!is.finite(x)) return(FALSE): the condition has length > 1#> and only the first element will be used#> # A tibble: 2 x 3#> x key value#> <dbl> <chr> <dbl>#> 1 1 y 2#> 2 1 z 3df %>% gather("key", "value", 2:3)
#> # A tibble: 2 x 3#> x key value#> <dbl> <chr> <dbl>#> 1 1 y 2#> 2 1 z 3
From tidyverse/tidyr#374
The text was updated successfully, but these errors were encountered: