R 包警告:为 'direction' 找到多个方法表

R Package Warning: multiple methods tables found for 'direction'

我正在维护空间数据的 R 包。当我 运行 检查 R-devel (Windows) 时,我得到:"Warning: multiple methods tables found for 'direction'",这禁止我重新提交我的 R 包。我已经检查过,只有一个函数 direction() 来自 raster 包 - 我没有明确导入的包,但在我做的 sf 中被建议。有什么想法可以 be/a 解决方法吗?

> library(sp)
> library(raster)
Warning messages:
1: multiple methods tables found for 'direction' 
2: multiple methods tables found for 'gridDistance' 

新会话:

> raster::direction
standardGeneric for "direction" defined from package "raster"

function (x, ...) 
standardGeneric("direction")
<bytecode: 0x8163a60>
<environment: 0x81349e0>
Methods may be defined for arguments: x
Use  showMethods(direction)  for currently available ones.
Warning messages:
1: multiple methods tables found for 'direction' 
2: multiple methods tables found for 'gridDistance' 
> terra::direction
standardGeneric for "direction" defined from package "terra"

function (x, ...) 
standardGeneric("direction")
<bytecode: 0x312a030>
<environment: 0x30e2640>
Methods may be defined for arguments: x
Use  showMethods(direction)  for currently available ones.

看起来 rasterterra 都定义了这些泛型,terra 1.5- 12 刚刚发布。解析度: https://github.com/rspatial/terra/issues/485#issuecomment-1012466626,在 terra 之后重新安装 raster