mitchelloharawild · GitHub

The v0.8.0 release introduced an change in behaviour with combining listed results in a grouped summarise. I couldn't find mention of it in the news, so I'm assuming that this is unintended.


v0.7.6 (last known working release)

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
tibble(grp = "grp", z = 2) %>%
  summarise(z = list(3), y = z)
#> # A tibble: 1 x 2
#>   z         y        
#>   <list>    <list>   
#> 1 <dbl [1]> <dbl [1]>
tibble(grp = "grp", z = 2) %>%
  group_by(grp) %>%
  summarise(z = list(3), y = z)
#> # A tibble: 1 x 3
#>   grp   z         y        
#>   <chr> <list>    <list>   
#> 1 grp   <dbl [1]> <dbl [1]>

Created on 2019-05-07 by the reprex package (v0.2.1)

Development version

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
tibble(grp = "grp", z = 2) %>%
  summarise(z = list(3), y = z)
#> # A tibble: 1 x 2
#>   z         y        
#>   <list>    <list>   
#> 1 <dbl [1]> <dbl [1]>
tibble(grp = "grp", z = 2) %>%
  group_by(grp) %>%
  summarise(z = list(3), y = z)
#> # A tibble: 1 x 3
#>   grp   z             y
#>   <chr> <list>    <dbl>
#> 1 grp   <dbl [1]>     3

Created on 2019-05-07 by the reprex package (v0.2.1)

Read the original on github.com ↗