Weird message? [.recacheSubclasses/Mnumeric]

I think this is only partially related to rstan, but I thought I’d give it a shot nonetheless…
So my package survHE does have pre-compiled rstan code to run a bunch of survival models (with specific application to health economics, but that’s irrelevant). Up until a couple of days ago, all fine. Lately, every time I load my package I get a weird warning

Warning message:
In .recacheSubclasses(def@className, def, env) :
  undefined subclass "numericVector" of class "Mnumeric"; definition not updated

Everything seems to work just fine, including the rstan implementation of models. I’ve tried to make some sense of the warning and looked online, but it seems like this isn’t very prevalent at all… I am guessing that the subclasses mentioned may have to do with C++? Is this something people have encountered before?
Like I said, may well not at all be a rstan-related issue, so apologies in advance if that’s the case!
Gianluca

Following up on this. Seems like a Ubuntu 16.04 issue (doesn’t happen on Ubuntu 20.04 - not tested on other OS, though).

I got this message on MacOS Big Sur 11.3.1 with R 4.0.5 (2021-03-31) – “Shake and Throw” and RStudio Version 1.4.1103:
Warning message:
In .recacheSubclasses(def@className, def, env) :
undefined subclass “numericVector” of class “Mnumeric”; definition not updated

The Mnumeric class is defined in the Matrix package, maybe see if the package version has changed recently or differs between your Ubuntu versions?

There’s a very recent version of Matrix (1 May 2021), which probably has done something to my Ubuntu 16.04 — perhaps something about compilers or something…

I found this project that dealt with the same issue:

I’ve encountered it when loading the rms package.

This warning message has been haunting me for a long time on Ubuntu, and I think I figured it out so am posting in case someone else has the problem.

I think the issue is this: rstan relies on RcppEigen and StanHeaders, both of which were last updated on CRAN during 2020. The warning message comes from Matrix versions that came to CRAN in early 2021 and after. So, if your RcppEigen and StanHeaders packages were installed before early 2021, you get the warning message. To make the warning message go away, you need to reinstall RcppEigen and StanHeaders (or maybe just one of the two, not sure).