[R] Reformat a data frame

Thorsten Muehge
Tue, 07 Nov 2006 09:10:52 -0000

Hello Experts,
how do I reformat a data frame in the way described below:


df1:
ID    desc  resist      thick temp
1     4711  100   5     20
2     4712  101   4     21
3     4711  99    3     19
4     4712  98    7     22

TO

df2:
id    desc  Param Value
1     4711  resist      100
1     4711  Thick 5
1     4711  temp  20
2     4712  resist      101
2     4712  Thick 4
2     4712  temp  21
3     4711  resist      99
3     4711  thick 4
3     4711  temp  19
4     4712  resist      98
4     4712  thick 7
4     4712  temp  22

Thanks a lot for your help.
With best regards
Thorsten