On Thu, 27 Oct 2011, Nordlund, Dan (DSHS/RDA) wrote:
What I think you want is as simple as test.melted <- melt(test)
Dan, et al.: No, it's not that simple. Unfortunately. I've tried various combinations of id.vars, measure.vars, and variable, but just cannot get the dates to display in the melted data frame. For example, m.tds.anal <- melt(tds.anal, id.vars = c('site', 'param'), measure.vars = 'sampdate', variable.name = 'variable', na.rm = T, value.name = 'quant')
head(m.tds.anal)
site param variable quant 1 UDS-O TDS sampdate 13488 2 STC-FS Cond sampdate 9661 3 UDS-O Mg sampdate 13790 4 UDS-O SO4 sampdate 13790 5 JCM-10B Ca sampdate 13685 6 JCM-10B Cl sampdate 13685 No matter where I put 'sampdate' it displays as that string rather than as the date itself. Rich ______________________________________________ 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.