Page 1 of 1

Error running R2MLwiN with mlnscript for OSX

Posted: Fri Jul 22, 2016 3:43 pm
by pranavgu

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

Re: Error running R2MLwiN with mlnscript for OSX

Posted: Mon Jul 25, 2016 9:04 am
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.