[R] R2WinBUGS: Data loading error

Hadassa Brunschwig h.brunschwig at utoronto.ca
Thu Sep 22 14:52:05 CEST 2005

Hi R-Help!

I am trying to use R2WinBUGS but I get the following error message in WinBUGS
(and there must be something wrong with my R statement as I tried it directly in
WinBUGS and it worked):

check(C:/Documents and Settings/Daikon/Roche/pop_model.txt)
model is syntactically correct
data(C:/Documents and Settings/Daikon/Roche/data.txt)
expected key word structure
...(and of course nothing works after that)

and when I close WinBUGS i get:
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file 'codaIndex.txt' 

Does anyone know what this 'expected key word structure' means?
This is my R code (and I guess my model file is ok):

modelA     <- c("C:/Documents and Settings/Daikon/Roche/pop_model.txt")
n          <- length(unique(subsetA$subject))    #number of subjects
nt         <- 13                                 #number of days
Y          <- subsetA$concentr                   #concentration per day/subject
t          <- 1:13                               #days
dataA      <- list("n","nt","Y","t")
parameters <- c("tau","C0","st90","C0.pop","st90.pop","tau.cpop","tau.stpop")
inits      <-
mcmcA      <-
Files/WinBUGS14",working.directory="C:/Documents and Settings/Daikon/Roche")

Thanks so much...



Hadassa Brunschwig
Birmannsgasse 10A
CH-4055 Basel
Phone: +41 78 797 6065
Email: h.brunschwig at utoronto.ca

More information about the R-help mailing list