[R] Summarizing data based on Date

Shivi82 shivibhatia at ymail.com
Tue Jun 9 14:01:23 CEST 2015


Hi Petr 

I researched a lot over the net and R manual as well based on which I
revamped my code and came to the code as:
test$CR_DT <- as.Date(test$CR_DT, '%d-%b-%y')

iii<- aggregate(test$CHG_WT,list(format(test$CR_DT,"%m")),FUN=sum)

However it still gives me the error as below:
Error in Summary.factor(c(1L, 1L, 1L, 3286L, 1646L, 3241L, 1L, 1L, 1307L,  : 
  ‘sum’ not meaningful for factors. 

If could you guide on how to achieve the desired output. Thanks. 



--
View this message in context: http://r.789695.n4.nabble.com/Summarizing-data-based-on-Date-tp4708328p4708384.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list