Skip to content
Back to formatted view

Raw Message

Message-ID: <AANLkTik6kMa_0aug6uzFV42d_NUfwtD2AorA0FTAhasF@mail.gmail.com>
Date: 2011-01-20T21:01:47Z
From: Hadley Wickham
Subject: How to reshape wide format data.frame to long format?
In-Reply-To: <86DE9F27-59B0-4AC9-97A7-446C764D723A@comcast.net>

>> 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/