If you want them as text you can also paste() them together:
library(dplyr, warn.conflicts = FALSE)
library(tidyr)
MAT <- matrix(c(1,1,1,2,3,3,4,5,5,5,6,10:20), ncol = 2)
DF <- as.data.frame(MAT)
DF %>%
group_by(V1) %>%
summarize(V2_concat = paste(V2, collapse=" "))
#> `summarise()` ungrouping output (override with `.groups` argument)
#> # A tibble: 6 x 2
#> V1 V2_concat
#> <dbl> <chr>
#> 1 1 10 11 12
#> 2 2 13
#> 3 3 14 15
#> 4 4 16
#> 5 5 17 18 19
#> 6 6 20
Created on 2020-12-15 by the reprex package (v0.3.0)
Or if you need to reuse it later you can also store them as a list-column (not intuitive if you never saw it before, but very powerful, since you can just loop on the list as needed):
DF %>%
group_by(V1) %>%
summarize(V2_concat = list(V2))
#> `summarise()` ungrouping output (override with `.groups` argument)
#> # A tibble: 6 x 2
#> V1 V2_concat
#> <dbl> <list>
#> 1 1 <dbl [3]>
#> 2 2 <dbl [1]>
#> 3 3 <dbl [2]>
#> 4 4 <dbl [1]>
#> 5 5 <dbl [3]>
#> 6 6 <dbl [1]>
Created on 2020-12-15 by the reprex package (v0.3.0)