Message-ID: <alpine.LNX.2.00.1110271112500.30779@salmo.appl-ecosys.com>
Date: 2011-10-27T18:16:33Z
From: Rich Shepard
Subject: Syntax Check: rshape2 melt()
In-Reply-To: <941871A13165C2418EC144ACB212BDB002181517@dshsmxoly1504g.dshs.wa.lcl>
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