library(tidyverse)
library(lubridate)
tibble(
group = c("a", "a", "b", "b"),
dates = ymd(c("2020-01-01", "20220207", "20220209", "20220115"))
) %>%
group_by(group) %>%
summarise(date_range = list(range(dates) %>%
set_names("min", "max"))) %>%
unnest_wider(date_range)
#> # A tibble: 2 x 3
#> group min max
#> <chr> <date> <date>
#> 1 a 2020-01-01 2022-02-07
#> 2 b 2022-01-15 2022-02-09
Created on 2022-05-09 by the reprex package (v2.0.1)