删除警告消息“在缓存中发现多个 class "tbl_df";使用第一个,来自命名空间 'tibble' 也由“memisc”定义

Remove warning message 'Found more than one class "tbl_df" in cache; using the first, from namespace 'tibble' Also defined by ‘memisc’

似乎是 tibblememisc 包中的冲突导致了错误消息。

library(tibble)
library(memisc)
library(dplyr)

d <- tibble(value = seq(0, 100)) 

    Found more than one class "tbl_df" in cache; using the first, from namespace 'tibble'
Also defined by ‘memisc’
Found more than one class "tbl_df" in cache; using the first, from namespace 'tibble'
Also defined by ‘memisc’
Found more than one class "tbl_df" in cache; using the first, from namespace 'tibble'
Also defined by ‘memisc’
Found more than one class "tbl_df" in cache; using the first, from namespace 'tibble'
Also defined by ‘memisc’
Found more than one class "tbl_df" in cache; using the first, from namespace 'tibble'
Also defined by ‘memisc’

我尝试简单地分离 memisc 包,但警告仍然存在。这是一个非常有害的错误,经常出现。

有关于如何压缩消息 here 的说明,海报上写着“因此,可能的修复可能涉及 (1) 删除 setOldClass("tbl_df") 代码和 (2)更新 NAMESPACE 文件以从 tibble R 包中导入 tbl_df S4 class。这还需要 (3) 在描述文件中的 Imports 而不是 Enhances 下列出 tibble R 包。你怎么看?

现在这对某些人来说很有意义,但对我来说却不是。任何人都可以分解消除此错误所涉及的步骤吗?

这是memisc包的一个bug,在0.99.30.7版本中已经修复,这里是GitHub update of the library.

还有一个 GitHub 问题 here

@llewmills

  1. 我无法修复无法重现的错误。如果我 运行 R 4.1.1 上的上述代码,我不会收到如上所示的任何消息。此外,这些只是信息性消息,既不是警告也不是错误。

  2. 安装新包版本的问题是由于包仍在使用中(即仍然附加)。再次尝试使用原始 R 会话应该可以。

  3. 请记住并尊重'memisc'是志愿者的工作,而不是商业产品。我正在分享对我自己的学术研究有很大帮助的软件,希望它也能帮助其他人。使用它并不能使您获得任何类型的 'customer service'.