renkun-ken / rlist

A Toolbox for Non-Tabular Data Manipulation
Other
204 stars 28 forks source link

rlist.ungroup does not work anymore (closed) #121

Closed AndreMikulec closed 6 years ago

AndreMikulec commented 6 years ago

When I run the first example of rlist.ungroup, I get the following error.

> list.unzip(list(p1 = list(a = 1, b = 2), p2 = list(a = 2, b = 3)))
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
> devtools::session_info()
- Session info ---------------------------------------------------------------
 setting  value
 version  R version 3.5.1 Patched (2018-10-09 r75424)
 os       Windows 10 x64
 system   x86_64, mingw32
 ui       RTerm
 language (EN)
 collate  English_United States.1252
 ctype    English_United States.1252
 tz       America/Chicago
 date     2018-11-13

- Packages -------------------------------------------------------------------
 package              * version date       lib source
 assertthat             0.2.0   2017-04-11 [1] CRAN (R 3.5.0)
 backports              1.1.2   2017-12-13 [1] CRAN (R 3.5.0)
 base64enc              0.1-3   2015-07-28 [1] CRAN (R 3.5.0)
 callr                  3.0.0   2018-08-24 [1] CRAN (R 3.5.1)
 cli                    1.0.1   2018-09-25 [1] CRAN (R 3.5.1)
 crayon                 1.3.4   2017-09-16 [1] CRAN (R 3.5.0)
 data.table             1.11.8  2018-09-30 [1] CRAN (R 3.5.1)
 debugme                1.1.0   2017-10-22 [1] CRAN (R 3.5.0)
 desc                   1.2.0   2018-05-01 [1] CRAN (R 3.5.1)
 devtools               2.0.1   2018-10-26 [1] CRAN (R 3.5.1)
 digest                 0.6.18  2018-10-10 [1] CRAN (R 3.5.1)
 fs                     1.2.6   2018-08-23 [1] CRAN (R 3.5.1)
 glue                   1.3.0   2018-07-17 [1] CRAN (R 3.5.1)
 gtools                 3.8.1   2018-06-26 [1] CRAN (R 3.5.0)
 lattice                0.20-38 2018-11-04 [2] CRAN (R 3.5.1)
 magrittr             * 1.5     2014-11-22 [1] CRAN (R 3.5.1)
 memoise                1.1.0   2017-04-21 [1] CRAN (R 3.5.0)
 PerformanceAnalytics   1.5.2   2018-03-02 [1] CRAN (R 3.5.1)
 pkgbuild               1.0.2   2018-10-16 [1] CRAN (R 3.5.1)
 pkgload                1.0.2   2018-10-29 [1] CRAN (R 3.5.1)
 prettyunits            1.0.2   2015-07-13 [1] CRAN (R 3.5.0)
 processx               3.2.0   2018-08-16 [1] CRAN (R 3.5.1)
 ps                     1.2.1   2018-11-06 [1] CRAN (R 3.5.1)
 quadprog               1.5-5   2013-04-17 [1] CRAN (R 3.5.0)
 R6                     2.3.0   2018-10-04 [1] CRAN (R 3.5.1)
 Rcpp                   1.0.0   2018-11-07 [1] CRAN (R 3.5.1)
 remotes                2.0.2   2018-10-30 [1] CRAN (R 3.5.1)
 rlang                  0.3.0.1 2018-10-25 [1] CRAN (R 3.5.1)
 rlist                * 0.4.6.1 2016-04-04 [1] CRAN (R 3.5.0)
 rprojroot              1.3-2   2018-01-03 [1] CRAN (R 3.5.0)
 sessioninfo            1.1.1   2018-11-05 [1] CRAN (R 3.5.1)
 testthat               2.0.1   2018-10-13 [1] CRAN (R 3.5.1)
 usethis                1.4.0   2018-08-14 [1] CRAN (R 3.5.1)
 withr                  2.1.2   2018-04-27 [1] Github (jimhester/withr@79d7b0d)
 xts                    0.11-2  2018-11-05 [1] CRAN (R 3.5.1)
 zoo                    1.8-4   2018-09-19 [1] CRAN (R 3.5.1)

[1] W:/R-3.5._/R_LIBS_USER_3.5._
[2] W:/R-3.5._/App/R-Portable/library
>
AndreMikulec commented 6 years ago

I did get it to work here in R 3.4 ( but not in R 3.5 above) list.unzip(list(p1 = list(a = 1, b = 2), p2 = list(a = 2, b = 3)))

str( list.unzip(list(p1 = list(a = 1, b = 2), p2 = list(a = 2, b = 3))) )
List of 2
 $ a: Named num [1:2] 1 2
  ..- attr(*, "names")= chr [1:2] "p1" "p2"
 $ b: Named num [1:2] 2 3
  ..- attr(*, "names")= chr [1:2] "p1" "p2"
AndreMikulec commented 6 years ago

Never mind.

I cleaned out my environment ( removed .Rhistory and .Rdata ), then restarted R 3.5 and tried again. rlist.unzip works.

> list.unzip(list(p1 = list(a = 1, b = 2), p2 = list(a = 2, b = 3)))
$a
p1 p2
 1  2

$b
p1 p2
 2  3

Please close this issue. Thanks.