Hi, The answer to this is probably straightforward, I have a dataframe and I'd like to build an index of column combinations, e.g.
col1 col2 --> col3 (the index I need) A 1 1 A 1 1 A 2 2 B 1 3 B 2 4 B 2 4 At the moment I use: col3 <- apply(mat[,sel.col], 1, paste0) But I wonder if another approach could be faster? Thanks, Emmanuel [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.