lme4 和 nlme 包之间的干扰

发布于 2024-12-20 03:44:31 字数 528 浏览 0 评论 0原文

我有这个脚本:

mod<-lmList(log(indwgt)~log(lngtclass)| sex, data=mbsp) 

两周前就有效了。今天我感觉

Error in eval(expr, envir, enclos) : object 'indwgt' not found

这是由于lme4和nlme之间的干扰造成的,但我不知道如何删除nlme。如果有任何帮助,我尝试了这个:

getAnywhere(lmList)

2 differing objects matching ‘lmList’ were found
in the following places
  package:lme4
  namespace:lme4
  namespace:nlme

但这对我来说毫无意义,除了增强我对两个包之间的干扰的感觉之外。有什么想法吗?我已经退出 R,重新开始,加载包,更新包,我能想到的一切。删除它们基本上不起作用。

I had this script:

mod<-lmList(log(indwgt)~log(lngtclass)| sex, data=mbsp) 

that worked two weeks ago. Today I get

Error in eval(expr, envir, enclos) : object 'indwgt' not found

I feel it is due to interferences between lme4 and nlme, but I don't know how to remove nlme. If it is of any help, I tried this:

getAnywhere(lmList)

2 differing objects matching ‘lmList’ were found
in the following places
  package:lme4
  namespace:lme4
  namespace:nlme

but it is meaningless to me, apart from strengthening my feeling of interference between both packages. Any ideas? I have quit R, started again, load packages, updated packages, everything I could think of. Removing them basically does not work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

幽梦紫曦~ 2024-12-27 03:44:31

确实,lme4nlme 包中有两个(略有不同)版本的 lmList。如果您已加载两者,并且想要确保使用 lmListnlme 版本,请使用 nlme::lmList或者通过detach("package:lme4")卸载lme4包。反之亦然,显然,如果您想使用 lme4 版本 (lme4::lmList, detach("package:nlme")。< strong>但是,我实际上不明白 lmList 的错误版本如何导致您发布 str(mbsp)< 的结果。 /code> 会有所帮助...

It is true that there are two (slightly different) versions of lmList in the lme4 and nlme packages. If you have both loaded and you want to make sure you are using the nlme version of lmList, use nlme::lmList. Or unload the lme4 package via detach("package:lme4"). Vice versa, obviously, if you want to use the lme4 version (lme4::lmList, detach("package:nlme"). However, I don't actually see how having the wrong version of lmList could lead to the specific error you are getting. Posting the results of str(mbsp) would help ...

篱下浅笙歌 2024-12-27 03:44:31

您的错误消息意味着 indwgt 不在 mbsp 中。

您是否有可能在过去两周内进行了一些更改,导致名称发生了微妙的变化?

Your error message means that indwgt is not in mbsp.

Is it possible that you've made some change in the last two weeks that resulted in a subtle name change?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文