R中带有aggr功能的错误消息

时间:2014-04-23 11:10:54

标签: r aggregate-functions

我有一个如下所示的数据集:

head(d)
X timestamp      station   year  month   ndvi    landcover     altitude   precipitation
1      1           A       2000   jan   0.4138   Mixed forest     2143          16.0

我想用它来做这件事:

r <- aggr(d,c("station","landcover","year"),c("altitude=mean(altitude)",
         "max.ndvi=NA","max.month=NA","max.timestamp=NA","precipitation=NA"))

不幸的是,我收到错误:

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

我尝试研究此错误的可能解决方案但没有任何成功。是否有太多元素?

我将不胜感激。

谢谢!

0 个答案:

没有答案