【问题标题】:R Package Warning: multiple methods tables found for 'direction'R 包警告:为“方向”找到多个方法表
【发布时间】:2022-01-15 05:35:48
【问题描述】:

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

【问题讨论】:

  • 我今天遇到了同样的错误,刚刚收到 Uwe Ligges 的一封电子邮件,说这是他们的错误。希望你也一样。
  • 谢谢! @DaveArmstrong

标签: r package spatial cran


【解决方案1】:
> 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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多