I have a dataset that looks like this:
head(d)
X timestamp      station   year  month   ndvi    landcover     altitude   precipitation
1      1           A       2000   jan   0.4138   Mixed forest     2143          16.0
and I would like to do this with it:
r <- aggr(d,c("station","landcover","year"),c("altitude=mean(altitude)",
         "max.ndvi=NA","max.month=NA","max.timestamp=NA","precipitation=NA"))
Unfortunately, I get the error:
Error in aggr_work(x, delimiter, plot, ...) : 
The missing-index of imputed variables must be of the type logical
In addition: Warning message:
In grep(delimiter, colnames(x)) :
argument 'pattern' has length > 1 and only the first element will be used
I tried researching possible solutions for this error but without any success. Are there too many elements?
I would appreciate any help.
Thanks!
