I have a dataframe with >100 columns, and I would to find the unique rows, by comparing only two of the columns. I\'m hoping this is an easy one, but I can\'t get it working
Using unique():
unique()
dat <- data.frame(id=c(1,1,3),id2=c(1,1,4),somevalue=c("x","y","z")) dat[row.names(unique(dat[,c("id", "id2")])),]