From: Uwe L. <li...@st...> - 2008-09-15 16:07:20
|
Rodney Sparapani wrote: > Uwe Ligges wrote: >> I cannot reproduce on Windows even when using 3 different directories: >> >> - one for data >> - one as working directory >> - one for the model file >> >> >> >> schools <- read.table ("d:/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("d:/temp") >> schools.sim <- bugs (data, inits, parameters, "d:/uwe/schools.bug", >> n.chains=3, n.iter=1000, working.directory="d:/temp") >> >> >> Simply works for me .... >> >> Uwe > Hi Uwe: > > But, you have the command setwd("d:/temp") and I don't. However, this does > not work around the problem either: > > library(R2WinBUGS) > schools <- read.table ("/usr/local/doc/r2winbugs/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, > "/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' OK, I still canoot reproduce on Windows. Can you please try to say: options(warn=2) # Run the example code again that produces some error now traceback() Can you please show us that traceback() stack? Thank you, Uwe |