I have a large dataframe and I want to check whether the values a set of (factor) variables uniquely identifies each row of the data or not.
My current strategy is t
How about:
length(unique(paste(dfTemp$var1, dfTemp$var2, dfTemp$var3)))==nrow(dfTemp)
Paste variables into one string, get unique, and compare the length of this vector with number of rows in your dataframe.