简体   繁体   中英

Interference between lme4 and nlme packages

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.

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 ...

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM