Skip to content
Prev 168739 / 398502 Next

reshape with two time variables

On Fri, Jan 30, 2009 at 5:57 PM, Neil Stewart
<neil.stewart at warwick.ac.uk> wrote:
If you're using melt from the reshape package, once you've melted the
data, you'll need to do something like:

m$a <- as.numeric(substr(m$variable, 1, 1))
m$b <- as.numeric(substr(m$variable, 3, 3))
m$variable <- NULL

Hadley