[R] Transform values from one column into column names of new dataframe

2008-05-02 Thread Matt
Hi, I have a question about reformatting data. It looks like it should be simple, but I've been working at it for awhile now and it's about time I ask for help. My data look like this: ITEM VALUE STEP item1 A first item2 C first item2 D second item1 A second

Re: [R] Transform values from one column into column names of new dataframe

2008-05-02 Thread hadley wickham
On Fri, May 2, 2008 at 11:05 AM, Matt [EMAIL PROTECTED] wrote: Hi, I have a question about reformatting data. It looks like it should be simple, but I've been working at it for awhile now and it's about time I ask for help. My data look like this: ITEM VALUE STEP item1 A

Re: [R] Transform values from one column into column names of new dataframe

2008-05-02 Thread Henrique Dallazuanna
Try this also: noquote(with(x, tapply(VALUE, list(ITEM, STEP), paste))) On Fri, May 2, 2008 at 1:05 PM, Matt [EMAIL PROTECTED] wrote: Hi, I have a question about reformatting data. It looks like it should be simple, but I've been working at it for awhile now and it's about time I ask for