I have a dataset in "long" format that looks something like this:
ID TEST RESULT 1 A 17 1 A 12 1 B 15 1 C 12 2 B 8 2 B 9 Now what I would like to do is transpose it like so: ID TEST A TEST B TEST C 1 17 15 12 1 12 . . 2 . 8 . 2 . 9 . When I try: reshape(mydata, v.names="result", idvar="id",timevar="test", direction="wide") It gives me only the first occurrence of each test for each subject. How can I transpose my dataset in this way without losing information about repeated tests? Any help or guidance would be appreciated! Thanks! -- View this message in context: http://www.nabble.com/Maintaining-repeated-ID-numbers-when-transposing-with-reshape-tp19151853p19151853.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.