Home > Enterprise >  Remove warning message 'Found more than one class "tbl_df" in cache; using the first,
Remove warning message 'Found more than one class "tbl_df" in cache; using the first,

Time:10-13

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?

CodePudding user response:

@llewmills

  1. I cannot fix a bug that I cannot reproduce. If I run the above code on R 4.1.1, I do not get any messages as shown above. Also, these are only informational messages, neither warnings nor errors.

  2. The problems with installing the new package version arise from the fact that the package is still in use (i.e. still attached). Trying again with a pristine R session should work.

  3. Please remember and respect that 'memisc' is a volunteer's work, and not a commercial product. I am sharing software that helps me very much in my own academic research, in the hope that it will help others as well. Using it does not entitle you to any kind of 'customer service'.

CodePudding user response:

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.

  • Related