[R] How to reshape wide format data.frame to long format?

Hadley Wickham hadley at rice.edu
Thu Jan 20 22:01:47 CET 2011


>> 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 ".", that would be even better.)
>
> Use strsplit and "["

Or colsplit, from reshape, that does this for you.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-help mailing list