Good afternoon,
I'm using the code:
soma<-aggregate(as.numeric(coop[c(10,18,26,34,42,50,58,66)]), by=list(coop$data), FUN=sum, na.rm=TRUE)
to aggregate the data based on the date key, which is in date format. I tried changing this variable to numeric or string, but it returns the same error:
Error in aggregate(as.numeric(coop[c(10, 18, 26, 34, 42, 50, 58, 66)]),:
(list) object cannot be coerced to type 'double'
What should I be doing?
I've done several other aggregates and I had not come across this error. There are values in NA at the bottom, but I do not think that's the problem.