Hi, I've tried to look through all the previous related Threads/posts but can't find a solution to what's probably a simple question. I have a data frame comprised of three columns e.g.: ID1 ID2 Value a b 1 b d 1 c a 2 c e 1 d a 1 e d 2 I'd like to convert the data to a matrix i.e.: a b c d e a n/a 1 2 1 n/a b 1 n/a n/a 1 n/a c 2 n/a n/a n/a 1 d 1 1 n/a n/a 2 e n/a n/a 1 2 n/a Any help is much appreciated, Jagz
______________________________________________ R-help@r-project.org mailing list 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.