I have a dataframe s> 100 columns, and I would find unique rows by comparing only two columns. I hope this is not easy, but I cannot get it to work with unique or duplicated myself.
In below, I would like to uniquely use only id and id2:
data.frame(id=c(1,1,3),id2=c(1,1,4),somevalue=c("x","y","z")) id id2 somevalue 1 1 x 1 1 y 3 4 z
I would like to get either:
id id2 somevalue 1 1 x 3 4 z
or
id id2 somevalue 1 1 y 3 4 z
(I have no preference which of the unique strings is saved)
r unique
Ina Mar 30 2018-12-12T00: 00Z
source share