Skip to content

R2Winbugs - problem with workign directory

3 messages · Virgilio Gomez Rubio, James Rooney

#
Hi all,

Having a problem with the R2Winbugs working.directory option.

My call to winbugs looks like this:

MCMCres<-bugs(debug=T,data=d,inits=inits,parameters.to.save=c("theta","alpha","tau","precv"),
              n.chains=2,n.iter=2000,n.burnin=500,n.thin=10, 
              model.file="ALS_spatial_CAR.txt", program="WinBUGS", WINE=WINE, WINEPATH=WINEPATH,useWINE=T,
              working.directory=".",codaPkg=F)

If I remove the working.directory option this all works fine.
If I leave it in - winbugs opens but doesn't load any model and doesn't do anything. It IS finding the model specification file because if it doens't R2winbugs gives an error.

I'm totally at a loss as to what is going on. Any ideas ?

This same line of code runs fine by the way if I open a Windows virtual machine and run R directly under winbugs - the problem there is the VM has limited memory and process allocation.

I hope someone can help! Many thanks,

James
1 day later
#
Hi James,

Try to use the full path (e.g., /home/james/mycode/...) instead of just
".".

Also, from the manual page:

 If 'useWINE=TRUE' is used, all paths (such as 'working.directory'
     and 'model.file', must be given in native (Unix) style, but
     'bugs.directory' can be given in Windows path style (e.g.
     "c:/Program Files/WinBUGS14/") or native (Unix) style (e.g.
     "/path/to/wine/folder/dosdevices/c:/Program Files/WinBUGS14").
     This is done to achieve greatest portability with default argument
     value for 'bugs.directory'.


Hope this helps.

Virgilio


El lun, 05-08-2013 a las 07:44 +0100, James Rooney escribi?:
#
Hi Virgilio,

Many thanks. As it happens today I switched to OpenBugs and don't have this particular problem anymore.

But thanks again,

James