[R] transposing panel data

Ben Bolker bbolker at gmail.com
Mon Dec 20 14:46:32 CET 2010

taby gathoni <tabieg <at> yahoo.com> writes:

> I am currently trying to transpose some large panel data set 
> ie transposing multiple rows in into a single
> column. instead the transpose functionality transposes
> all rows into columns. my sample data set looks
> like below:

  Try the melt and cast functions in the reshape (or reshape2)
packages (reshape2 may be faster).  It may take a bit of work
to get the syntax right (try it out on a small subset of your

  Ben Bolker

More information about the R-help mailing list