[Rd] After package update, old S4 method is dispatched

Jan Netík net|kj@ @end|ng |rom gm@||@com
Tue Oct 3 11:16:04 CEST 2023


Simon,

Many thanks for your advice! The issue was that another package was
inheriting from the "mirt" class in question. Apparently, some methods are
cached at build time (is this documented anywhere?). After reinstalling the
package that extends the "mirt" class, the proper method is now being
dispatched. No other packages needed to be reinstalled.

Best,
Jan

po 2. 10. 2023 v 20:56 odesílatel Simon Urbanek <simon.urbanek using r-project.org>
napsal:

> Jan,
>
> have you re-installed all packages? If you change (update) any package
> that uses S4 it may be necessary to re-install all its reverse-dependencies
> as well since they may include cached values in their namespaces, so the
> easiest is to make sure you re-install all packages.
>
> Cheers,
> Simon
>
>
> > On Oct 3, 2023, at 4:18 AM, Jan Netík <netikja using gmail.com> wrote:
> >
> > Hello R-devel,
> >
> > I hope that you are all doing well and that this is the right place to
> > discuss my somewhat mysterious issue with S4.
> >
> > On our Ubuntu server, we have "mirt" package installed which defines S4
> > method for "coef" standard generic. We updated the package with the usual
> > "install.packages", restarted, and observer error calling coef on mirt
> > object that should not be possible: "Error in which: argument "nfact" is
> > missing, with no default" (which has no such argument).
> >
> > After days of investigation, I found that from mirt 1.37 to current 1.40,
> > the method changed as well as some internal functions used by the method.
> > The aforementioned error stems from the fact that these internal ordinary
> > functions were changed properly as we updated the package, but the S4
> > method dispatched stuck with the 1.37 version. I am by no means an expert
> > on S4 matter, but I know that these are cached to some extent. I thought
> > the cache is session-bound and have no idea how the issue can possibly
> > persist even after a complete reboot of the machine. I can detach and
> > library() mirt in one R session which solves the issue temporarily, but
> > emerges right back in any new R session.
> >
> > Sadly, I cannot provide any reproducible example as I am completely
> unaware
> > of the cause and even I cannot reproduce this issue outside of the
> server.
> >
> > Any insights on how this issue could have started would be highly
> > appreciated.
> >
> > Best regards,
> > Jan Netík
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
>

	[[alternative HTML version deleted]]



More information about the R-devel mailing list