Search code examples
rtibble

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


There seems to be a clash in the tibble and memisc packages causing the error message.

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’

I tried simply detaching the memisc package but the warning remained. It is an extremely pernicious bug that comes up a LOT.

There are instructions how to squash the message here with the poster saying "Therefore, a potential fix could involve (1) removing the setOldClass("tbl_df") code and (2) updating the NAMESPACE file to import the tbl_df S4 class from the tibble R package. This would also require (3) listing the tibble R package under Imports and not Enhances in the DESCRIPTION file. What do you think?"

Now this make sense to some but not to me. Can anyone break down the steps involved to remove this bug?


Solution

  • This is a bug of the memisc package, this has been fixed in version 0.99.30.7, here is the GitHub update of the library.

    Also there was a GitHub issue about it here.