From: Gorjanc G. <Gre...@bf...> - 2008-09-10 06:50:13
|
... >>> 1. The working.directory is assumed to be the same directory as the >>> model.file and setting working.directory to something else doesn't help. >> >> Working directory and model.file can be in separate directories, you >> can you tell me an example where it does not work. >> > Doesn't work. See below: > > > schools.sim <- bugs (data, inits, parameters, > "/usr/local/doc/r2winbugs/schools.bug", > + n.chains=3, n.iter=1000, working.directory=".") > Warning message: > In file.create(to[okay]) : > cannot create file '/usr/local/doc/r2winbugs/schools.txt', reason > 'Permission denied' Rodney, this is a problem with permissions and not with R2WinBUGS! /usr/local/doc folders are usually not writable for regular users. If you want to avoid this problem, you can do either: A. Put modelfile somewhere else. If there will be many users (say a whole class), you do not want that they will be overwritting the same files, do you? Putting the modelfile to a home folder of each user, makes much more sense. B. You also might change the permissions of the /usr/local/doc/r2winbugs/ folder. Actually, this is needed since the R2WinBUGS package changes some parameters related to burnin and metropolis acceptance rate in a file that resides in /usr/local/doc/r2winbugs/. I am not really aware what actually is done, since the code was written by Andrew Gelman and I just make it sure that some bits run under linux. So my recommendation is: - change permissions in /usr/local/doc/r2winbugs/ via chmod -R uga+w /usr/local/doc/r2winbugs/ - make sure that each user is using its own modelfile Regards, Gregor |