search for: pet2

Displaying 1 result from an estimated 1 matches for "pet2".

Did you mean: fet2
2011 Dec 08
1
partial duplicates of dataframe rows, indexing and removal
Hello. I am trying to remove from my dataframe, those rows in which the first 7 columns are duplicated even if subsequent columns make those rows unique. df<-data.frame(id=rep(c('amy','bob','joe') , each=5), pet1=sample(LETTERS[1:3],15, replace=T), pet2=sample(LETTERS[1:3],15, replace=T), pet3=sample(LETTERS[1:5],15, replace=T)) >df id pet1 pet2 pet3 1 amy C B A 2 amy B A A 3 amy A A D 4 amy B C A 5 amy C B B 6 bob B A A 7 bob C A C 8 bob C C A 9 bob...