Hi folks, I am new to the list and relatively new to R. I am trying to unstack data "arraywise" and could not find a convenient solution yet. I tried to find a solution for the problem on help archives. I also tried to use the reshape command in R and the reshape package but could not get result. I will illustrate the case below, but the real dataset is quite large so that I would appreciate an easy solution if there is any.
The current data structure (variable names): ID, TIME, BUY-A, BUY-B, SELL-A, SELL-B Achieved structure (with the reshape command or the reshape package) ID, TIME, BUY-A ID, TIME, BUY-B ID, TIME, SELL-A ID, TIME, SELL-B This is regular unstacking with two identifier variables. Nothing special though. What I am looking for and did not manage is the following structure: ID, TIME, BUY-A, SELL-A ID, TIME, BUY-B, SELL-B I am quite sure it's pretty easy, but I could not find how to do this. Thanks a bunch, Daniel ______________________________________________ R-help@stat.math.ethz.ch 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.