Displaying 1 result from an estimated 1 matches for "m2009".
Did you mean:
  2009
  
2009 Mar 11
1
Reshape question.
This hopefully is trivial. I am trying to reshape the data using the reshape package.
First I read in the data:
a2009 <- read.csv("Total2009.dat", header = TRUE)
Then I trim it so that it only contains the columns that I have interested in:
m2009 <- melt(a2009, id.var=c("DayOfYear","Category","SubCategory","Sku"), measure.var=c("Quantity"), na.rm=TRUE)
Then I start to formulate the data that I will process:
c2009 <- cast(m2009, DayOfYear ~ variable | Category, sum)
Finally I aggrega...