Re: [R] Reshape Dataframe

From: hadley wickham <h.wickham_at_gmail.com>
Date: Tue, 18 Dec 2007 08:15:46 -0600

On 12/18/07, Bert Jacobs <b.jacobs_at_pandora.be> wrote:
>
> Hi,
>
> I'm having a bit of problems in creating a new dataframe.
> Below you'll find a description of the current dataframe and of the
> dataframe that needs to be created.
> Can someone help me out on this one?

library(reshape)
dfm <- melt(df, id = 1:3)
cast(dfm, ... ~ Var3)

You can find out more about the reshape package at http://had.co.nz/reshape

Hadley

-- 
http://had.co.nz/

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 18 Dec 2007 - 14:18:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 18 Dec 2007 - 16:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.