I have a data frame with some rows that are almost, but not quite duplicates of each other. By using duplicated(key) on one column and on the column reversed, I can get 2 columns in my data frame that have adjacent rows with TRUE. For example key value d di ...... OTHER COLUMNS 1 1 FALSE FALSE 2 0 FALSE TRUE #Eliminate this row 2 2 TRUE FALSE 3 0 FALSE FALSE 4 0 FALSE FALSE 5 1 FALSE FALSE 6 3 FALSE TRUE 6 2 TRUE FALSE #Eliminate this row 7 0 FALSE FALSE . . .
I want to eliminate the row with the lower value in adjacent rows that have TRUE. And in principal, I could have more than 2 duplicate rows next to each other. How can I do this? Thanks, Jim ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.