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
unnest() on list with factor does not work after upgrading to 0.8.0 #442
Comments
It has been reported in #407 and already been fixed (see NEWS) It is working on last dev version library(tidyr)
packageVersion("tidyr")
#> [1] '0.8.0.9000'
library(tibble)
packageVersion("tibble")
#> [1] '1.4.2'
vec_num <- c(1, 2, 3)
vec_fac <- as.factor(vec_num)
tib <- tibble(v = list(vec_num))
unnest(tib, v)
#> # A tibble: 3 x 1
#> v
#> <dbl>
#> 1 1.
#> 2 2.
#> 3 3.
tib <- tibble(v = list(vec_fac))
unnest(tib, v)
#> # A tibble: 3 x 1
#> v
#> <fct>
#> 1 1
#> 2 2
#> 3 3 Created on 2018-03-28 by the reprex package (v0.2.0). Session infodevtools::session_info()
#> Session info -------------------------------------------------------------
#> setting value
#> version R version 3.4.3 (2017-11-30)
#> system x86_64, mingw32
#> ui RTerm
#> language (EN)
#> collate French_France.1252
#> tz Europe/Paris
#> date 2018-03-28
#> Packages -----------------------------------------------------------------
#> package * version date source
#> ansistrings 1.0.0.9000 2018-03-28 Github (r-lib/ansistrings@4e4d309)
#> assertthat 0.2.0 2017-04-11 CRAN (R 3.4.0)
#> backports 1.1.2 2017-12-13 CRAN (R 3.4.3)
#> base * 3.4.3 2017-12-06 local
#> bindr 0.1.0.9000 2018-02-09 Github (krlmlr/bindr@4b20179)
#> bindrcpp 0.2.0.9000 2018-02-10 Github (krlmlr/bindrcpp@7553d4f)
#> cli 1.0.0.9002 2018-03-28 Github (r-lib/cli@53c129a)
#> compiler 3.4.3 2017-12-06 local
#> crayon 1.3.4 2017-09-16 CRAN (R 3.4.2)
#> datasets * 3.4.3 2017-12-06 local
#> devtools 1.13.5 2018-02-18 CRAN (R 3.4.3)
#> digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
#> dplyr 0.7.4 2017-09-28 CRAN (R 3.4.3)
#> evaluate 0.10.1 2017-06-24 CRAN (R 3.4.2)
#> glue 1.2.0 2017-10-29 CRAN (R 3.4.2)
#> graphics * 3.4.3 2017-12-06 local
#> grDevices * 3.4.3 2017-12-06 local
#> hms 0.4.2 2018-03-10 CRAN (R 3.4.3)
#> htmltools 0.3.6 2017-04-28 CRAN (R 3.4.2)
#> knitr 1.20 2018-02-20 CRAN (R 3.4.3)
#> magrittr 1.5 2014-11-22 CRAN (R 3.4.2)
#> memoise 1.1.0 2017-04-21 CRAN (R 3.4.3)
#> methods * 3.4.3 2017-12-06 local
#> pillar 1.2.1 2018-02-27 CRAN (R 3.4.3)
#> pkgconfig 2.0.1 2017-03-21 CRAN (R 3.4.0)
#> prettyunits 1.0.2 2015-07-13 CRAN (R 3.4.0)
#> progress 1.1.2.9002 2018-03-28 Github (r-lib/progress@72c9873)
#> purrr 0.2.4.9000 2018-02-05 Github (cderv/purrr@249a3e9)
#> R6 2.2.2 2017-06-17 CRAN (R 3.4.2)
#> Rcpp 0.12.16 2018-03-13 CRAN (R 3.4.4)
#> rlang 0.2.0.9001 2018-03-28 Github (tidyverse/rlang@49d7a34)
#> rmarkdown 1.8.10 2018-02-24 Github (rstudio/rmarkdown@1ccf6a0)
#> rprojroot 1.3-2 2018-01-03 CRAN (R 3.4.3)
#> selectr 0.3-2 2018-03-05 CRAN (R 3.4.3)
#> stats * 3.4.3 2017-12-06 local
#> stringi 1.1.7 2018-03-12 CRAN (R 3.4.3)
#> stringr 1.3.0 2018-02-19 CRAN (R 3.4.3)
#> tibble * 1.4.2 2018-03-28 Github (tidyverse/tibble@5f0b6a0)
#> tidyr * 0.8.0.9000 2018-03-28 Github (tidyverse/tidyr@32b73ea)
#> tidyselect 0.2.4 2018-02-26 CRAN (R 3.4.3)
#> tools 3.4.3 2017-12-06 local
#> utf8 1.1.3 2018-01-03 CRAN (R 3.4.3)
#> utils * 3.4.3 2017-12-06 local
#> withr 2.1.2 2018-03-28 Github (r-lib/withr@79d7b0d)
#> xml2 1.1.0 2017-01-07 url
#> yaml 2.1.18 2018-03-08 CRAN (R 3.4.3) |
thanks for letting me know |
Glad it's fixed! Thanks for tracking this one, @cderv! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for the great tidyverse packages. I recently ran into a problem after upgrading R to 3.4.4 and subsequently tidyr to 0.8.0 and tibble to 1.4.2. I am posting the issue here because I get the error when trying to use unnest()
this does not work anymore -----------------------------------------------------------------------------
but used to work with this configuration ----------------------------------------------------------------------
The text was updated successfully, but these errors were encountered: