[R] transpose dataset

Felipe Carrillo mazatlanmexico at yahoo.com
Thu Mar 13 01:18:38 CET 2008


Hi all:
How can I transpose this dataset from column to row
id    week   value
1      5       51
2      6       73
3      7       41
4      8       22
5      9       83
6      10      55
7      11      42
to something like this...
id    1  2  3  4  5  6  7
week  5  6  7  8  9  10 11
value 51 73 41 22 83 55 42

Felipe D. Carrillo
  Fishery Biologist
  US Fish & Wildlife Service
  California, USA



More information about the R-help mailing list