I have quite many variables to feed like to aggregate
and apparently I'm lazy to explicitly type all especially they change once in a while but those I'd like to exclude are mostly the same. I tried to write
hru.mean <-
aggregate(.-LULC~GIS, hru.annual, "mean")
but apparently it is not quite right as it says
Error in aggregate.data.frame(mf[1L], mf[-1L], FUN = FUN, ...) :
no rows to aggregate
In addition: Warning message:
In Ops.factor(., LULC) : - not meaningful for factors
I just saw this, so it looks like it works for lm
but does not work for aggregate
. Are there any alternatives?