I have a data frame which each row has 7 numbers, I would like to do a for or while loop to tell me that when a row is the same as a row.
data frame:
1st 2nd 3rd 4th 5th 6th 7th
1 5 32 34 38 39 49 8
2 10 20 21 33 40 44 34
3 10 20 26 28 35 48 13
4 14 19 23 36 44 46 7
5 9 24 25 27 36 38 41
6 7 13 14 20 29 32 28
7 11 22 24 28 29 38 20
8 1 11 29 33 36 44 37
9 9 12 25 31 43 44 5
10 1 5 6 31 39 46 44
11 14 19 23 36 44 46 7
desired output:
4 14 19 23 36 44 46 7
11 14 19 23 36 44 46 7
I tried the code but error: lapply(df, function(i) all(df[i,] == df[1:nrow(df),]))
but it is not correct. please advice, thanks.