Is there anyway to use aggregate function with more than one input in dcast, or other functions can do this?
For example
names(airquality) <- tolower(names(airquality))
aqm <- melt(airquality, id=c("month", "day"), na.rm=TRUE)
dcast(aqm, month ~ variable, mean)
How can I calculate with mean of "value" weighted by day? Thanks in advance.