Мы также можем сделать это в base R
df1[with(df1, Person_ID %in% intersect(Person_ID[wave %in% c(1, 3, 6, 12, 18)],
Person_ID[!wave])),]
# Person_ID wave
#1 1 0
#2 1 1
#3 1 3
#4 1 6
#5 1 12
#6 1 18
#8 3 0
#9 3 1
данные
df1 <- structure(list(Person_ID = c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 3L,
3L, 4L, 4L), wave = c(0L, 1L, 3L, 6L, 12L, 18L, 0L, 0L, 1L, 6L,
12L)), class = "data.frame", row.names = c(NA, -11L))