Error: could not find function “overlay” after reinstall

二次信任 提交于 2019-12-24 00:35:51

问题


I reinstalled my pc and also reinstalled R, but I somehow get an error when running my R program:

Error: could not find function "overlay"

which was fine on the previous installation.

The new R version is 3.2.4., so I tried to downgrade the version to 3.1.* and 3.0.*, but this was not helpful.

Libraries I used are:

library(sp)
library(maptools)
library(gstat)
library(rgdal)
library(sm)
library(png)

It seems like overlay is included in the sp package. I don't know what to do.


回答1:


overlay is deprecated, see http://www.inside-r.org/packages/cran/sp/docs/overlay (and section 'Note' therein). It has been replaced with over that seemingly overcomes a set of inconsistencies associated with overlay. Edzer wrote a nice vignette about Map overlay and spatial aggregation in sp using the over function - you should probably have a look at it.



来源:https://stackoverflow.com/questions/36493476/error-could-not-find-function-overlay-after-reinstall

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!