I've got a dataset with columns of values, and need to find if any columns are matching in every row. I've been able to find which columns have a duplicate using:
S1 <- c(80,80,0,0,100)
S2 <- c(90,90,0,0,100)
S3 <- c(80,80,0,0,100)
eg <- data.frame(S1,S2,S3)
duplicated(t(eg))
where S1 and S3 are identical. This returns:
S1 = FALSE
S2 = FALSE
S3 = TRUE
So I know S3 is a duplicate of either S1 or S2, but I'm unsure which. Is there any terms I can add to help me determine which columns are identical to one another? Something like this:
S1 = S3
S2 = Unique
S3 = S1
Thank you!