Displaying 1 result from an estimated 1 matches for "postoff_1_1".
2011 Jan 20
4
How to reshape wide format data.frame to long format?
...to a 3 x 2501 data.frame where the "key" variable is kept, the
values in columns 2-61 above is inserted into a "values" column and
the name of the column is inserted in a third column ("variable"
perhaps).
Like
key variable value
POSTOFF_1_1 AMR.pa1.M 5
POSTOFF_1_1 AMR.pa2.M 3
....
I think I should be able to do this using the "reshape" function, but
I cannot get it to work. I think I need some help to understand
this...
(If I could split the "variable" into three separate columns splitting
by &...