Error running R2MLwiN with mlnscript for OSX

Welcome to the forum for R2MLwiN users. Feel free to post your question about R2MLwiN here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to R2MLwiN: Running MLwiN from within R >> http://www.bris.ac.uk/cmm/software/r2mlwin/
Post Reply
pranavgu
Posts: 1
Joined: Fri Jul 22, 2016 3:29 pm

Error running R2MLwiN with mlnscript for OSX

Post by pranavgu »

Hi,

I just bought a license for MLwiN and was trying to use the new "mlnscript" for OSX in order to use the R2MLwiN package in R.
(as instructed https://www.cmm.bristol.ac.uk/forum/vie ... 2437814b28, I haven't installed the .msi file)

Here is what I ran and the error that I'm unable to debug.

Code: Select all

> library(R2MLwiN)
Loading required package: stats4
Loading required package: lattice
Loading required package: coda
The MLwiN_path option is currently set to /opt/mln/mlnscript
To change this use: options(MLwiN_path="<path to MLwiN>")

> options(MLwiN_path="/Users/pranav/Documents/Content/MLwin_script/mlnscript")
> data(tutorial, package = "R2MLwiN")
> mymodel <- runMLwiN(normexam ~ 1 + standlrt + (1 + standlrt | student),
+ estoptions = list(EstM = 1), data = tutorial)

MLwiN is running, please wait......
dyld: Library not loaded: @executable_path/libmln.dylib
  Referenced from: /Users/pranav/Documents/Content/MLwin_script/mlnscript
  Reason: image not found

Error in read.dta(chainfile[i]) : 
  unable to open file: 'No such file or directory'


How can I make sure the package find the library it needs?
ChrisCharlton
Posts: 1351
Joined: Mon Oct 19, 2009 10:34 am

Re: Error running R2MLwiN with mlnscript for OSX

Post by ChrisCharlton »

The file libmln.dylib that this message refers to should have also been in the .dmg file that you downloaded. This needs to be put in the same directory as the mlnscript file that you point to from within R.
Post Reply