I have the following data:
x1 x2 x3 x4 34 14 45 53 2 8 18 17 34 14 45 20 19 78 21 48 2 8 18 5
In rows 1 and 3; and
An alternative using ave:
ave
dat[ave(dat[,1], dat[-4], FUN=length) > 1,] # x1 x2 x3 x4 #1 34 14 45 53 #2 2 8 18 17 #3 34 14 45 20 #5 2 8 18 5