From: Rodney S. <rsp...@mc...> - 2008-10-06 14:10:32
|
Gorjanc Gregor wrote: > Hi Rodney, > > >> I just sent out a bug report. Did anyone get it? I hate Outlook! >> > > Then stop using it! Read further ... > > Actually, I don't. But, in order to send the bug report from my Mac, where I did the testing, I had to... >> Bug 1, Priority Secondary: >> >>> if(!exists("baseenv", mode="function")) baseenv <- function() NULL >>> options(STERM='iESS', editor='emacsclient') >>> options(warn=2) >>> library(R2WinBUGS) >>> >> Loading required package: coda >> Loading required package: lattice >> >>> schools <- read.table ("schools.dat", header=T) >>> J <- nrow (schools) >>> y <- schools$estimate >>> sigma.y <- schools$sd >>> data <- list ("J", "y", "sigma.y") >>> inits <- function() >>> >> + list (theta=rnorm(J,0,100), mu.theta=rnorm(1,0,100), >> + sigma.theta=runif(1,0,100)) >> >>> parameters <- c("theta", "mu.theta", "sigma.theta") >>> setwd(".") >>> schools.sim <- bugs (data, inits, parameters, "schools.bug", debug=TRUE, >>> >> + n.chains=3, n.iter=1000, working.directory=".") >> sh: /Volumes/My: No such file or directory >> > ... > >> Error in .fileCopy(file.path(bugs.directory, "System/Rsrc/Registry.odc"), : >> no files to copy from >> Error in if (!file.exists(dos.location)) stop(paste("WinBUGS executable does not exist in", : >> argument is of length zero >> Error in .fileCopy(file.path(bugs.directory, "System/Rsrc/Registry_Rsave.odc"), : >> no files to copy from >> >> This seems to be a bug with bad defaults. Since supplying the correct defaults >> works. >> > > Hmm, there is a problem with bugs.directory default. It is not really a problem, since > we do not know what is the default place for Mac applications? The default also does > not work on Linux if WinBUGS is not strictly installed in "c:/Program Files/WinBUGS14/" > part of wine. The help of bugs() says > > ... > Operation system support: > > MS Windows no problem > > Linux, Mac OS X and Unix in general possible with Wine emulation via useWINE=TRUE, but only for WinBUGS 1.4.* > > If useWINE=TRUE is used, all paths (such as working.directory and model.file, must > be given in native (Unix) style, but working.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 > working.directory. > > Unless you can provide a reasonable defaul for Mac, we can not help you! > > Umm. According to my notes I did. Or was that just a patch that I applied to my local copy that was not incorporated into the mainline. Can't find it right now. But, the default for all Mac applications is /Applications. That was in the workaround I sent. The reason is that that the Mac filesystem has permissions since it is just the Unix filesystem with a few bells and whistles. The /Applications directory has the permissions necessary to allow any user to install applications system-wide, a nice compromise between security and practicality. Other directories are secure so they are not an option (and for real Mac applications, they actually need to be in /Applications: this is probably more than you need or want to know). > I wonder where "sh: /Volumes/My: No such file or directory" is comming from. It looks like the path has space > in it. Perhaps we could be more informative in such cases so that users would be warned that bugs.directory > needs to be accomodated. > > I will look into other bug later. > > Btw. Why do you use setwd(".")? It does not make sense, since this is changing the working directory to > the current one. > > gg > I don't know. I got that from the Solaris example that you guys helped me with. I figured you guys know what you are doing. My mistake :o) -- Rodney Sparapani Center for Patient Care & Outcomes Research (PCOR) Sr. Biostatistician http://www.mcw.edu/pcor 4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW) WWLD?: What Would Lombardi Do? Milwaukee, WI, USA |