If I have a dataframe like this:
neu <- data.frame(test1 = c(1,2,3,4,5,6,7,8,9,10,11,12,13,14),
test2 = c("a","b","a","b","c","c","a","c","c","d","d","f","f","f"))
neu
test1 test2
1 1 a
2 2 b
3 3 a
4 4 b
5 5 c
6 6 c
7 7 a
8 8 c
9 9 c
10 10 d
11 11 d
12 12 f
13 13 f
14 14 f
and I would like to select only those values where the level of the factor test2
appears more than let's say three times, what would be the fastest way?
Thanks very much, didn't really find the right answer in the previous questions.