Hi All,
I have some integer-based survey data. N = 10,000, X = 6. I would like to encode each of the 10,000 observations as a string of 6 variables
Could someone please show me how to encode this in R, such that rows with duplicate strings take on the same assignment?
Would be greatly appreciated
dat <- data.frame(
matrix(
sample(1:3,5*12, replace=TRUE),12,5,
dimnames=list(1:12,c("X1","X2","X3","X4","X5"))
),
Sex=rep(c("Male", "Female")))