Thank you, works!
-Original Message-
From: Rowe, Brian Lee Yung (Portfolio Analytics) [mailto:b_r...@ml.com]
Sent: Thursday, February 19, 2009 5:52 PM
To: Wacek Kusnierczyk; Tan, Richard
Cc: r-help@r-project.org
Subject: RE: [R] transform key value pair to column
Try this:
> du
NA
4 3 20.0 12.0
6 4 NA 5.8
Brian
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Wacek Kusnierczyk
Sent: Thursday, February 19, 2009 5:39 PM
To: Tan, Richard
Cc: r-help@r-project.org
Subject: Re: [R] transform k
see ?stack, for example.
vQ
Tan, Richard wrote:
> Hi, is there a good way (instead of a time-consuming for loop) to
> transfer a key/value pair dataframe to a dataframe with key as column
> and value as row? For example, I have a dataframe with three columns:
> id, code, value:
>
> id,code,val
3 matches
Mail list logo