Hello there!
I recently switched to the new tidyr
version and I am a bit confused by the output. Consider the old version of nest
.
tibble(group = c(1,1,1,2,2,2),
value1 = c('a','b','c','d','e','f'),
value2 = c(10,20,30,40,50,60)) %>%
group_by(group) %>%
nest_legacy()
# A tibble: 2 x 2
group data
<dbl> <list>
1 1 <tibble [3 x 2]>
2 2 <tibble [3 x 2]>
and now the new one
tibble(group = c(1,1,1,2,2,2),
value1 = c('a','b','c','d','e','f'),
value2 = c(10,20,30,40,50,60)) %>%
group_by(group) %>%
nest()
# A tibble: 2 x 2
# Groups: group [2]
group data
<dbl> <S3: vctrs_list_of>
1 1 a , b , c , 10, 20, 30
2 2 d , e , f , 40, 50, 60
As you can see, it is very difficult to see how many variables we have in the list-column. Actually, with many columns the list representation in nest spans several lines making the output illegible.
Am I missing something here? Is this done on purpose? My usual use case is to group_by()
, nest()
and then feed to purrr::map()
for further processing (sometimes using future_map()
for multiprocessing).
Any feedback appreciated. Thanks!