I am not sure about this but I don't see how a melt command helps. See what z = dcast(x, I ~ V, mean) gives you.
--- On Sun, 3/13/11, Jim & Carolyn Watkins <jcwat...@gwi.net> wrote: > From: Jim & Carolyn Watkins <jcwat...@gwi.net> > Subject: [R] A basic question about reshape2 > To: r-help@r-project.org > Received: Sunday, March 13, 2011, 9:18 AM > Dear R Community: > > > > This is a newbie reshare2 question; it starts with read a > set of data and to > melt it: > > x = data.frame(I=c("a","b","a","b","b"), V=c(2,4,2,5,7)) > > y = melt(x, id = 1:1) > > What is wrong with the final dcast step: > > z = dcast(y, formula = I ~ "variable", c(length, > mean, median)) > Will one of you please help me with this problem? ______________________________________________ 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.