On Tue, Jun 29, 2010 at 12:22 PM, Dimitri Liakhovitski
<dimitri.liakhovit...@gmail.com> wrote:
> Hello, everyone!
> I have a very simple task - I have a data frame (see MyData below) and
> I need to stack the data (see result below).
> I wrote the syntax below - it's very basic and it does what I need.
> But I am sure what I am trying to do is a very typical task and there
> must be a much shorter/more elegant way of doing it.
> Any advice?

library(reshape)
melt(MyData)

Hadley

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

______________________________________________
R-help@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.

Reply via email to