Syntax Check: rshape2 melt()
On Thu, 27 Oct 2011, Nordlund, Dan (DSHS/RDA) wrote:
You should be able to get what you want using the dcast function (I think). test.melted <- melt(tds.anal) dcast(test.melted, site + sampdate ~ param)
Dan, I don't think the data frame melted properly. I tried the dcast() but sampdate is not found: c.tds.anal <- dcast(m.tds.anal, site + sampdate ~ param) Error in eval(expr, envir, enclos) : object 'sampdate' not found Perhaps I still need to better understand the parameters in the melt() function. Rich