Here's a dplyr solution.
library(dplyr, warn.conflicts = FALSE)
data <- tibble(
id = c(1, 1, 2, 3, 4, 4, 4, 5, 6, 7),
col = letters[1:10]
)
data
#> # A tibble: 10 x 2
#> id col
#> <dbl> <chr>
#> 1 1 a
#> 2 1 b
#> 3 2 c
#> 4 3 d
#> 5 4 e
#> 6 4 f
#> 7 4 g
#> 8 5 h
#> 9 6 i
#> 10 7 j
data %>%
group_by(id) %>%
filter(n() > 2)
#> # A tibble: 3 x 2
#> # Groups: id [1]
#> id col
#> <dbl> <chr>
#> 1 4 e
#> 2 4 f
#> 3 4 g
Created on 2020-09-10 by the reprex package (v0.3.0)