[R] R2WinBUGS problem: bugs - storage.mode error

dhocking dhocking at unh.edu
Mon Jul 11 05:05:54 CEST 2011


I have successfully used R2WinBUGS in the past and an trying to use basically
the same code with some different data but I'm getting the following error:

> out <- bugs(data=win.data, inits=inits, parameters.to.save=params,
> model.file = "PoissonGLMM.txt", n.chains=nc, n.iter=ni, n.burn=nb,
> n.thin=nt, debug=TRUE, DIC=TRUE, working.directory=getwd())
*Error in storage.mode(x) <- "double" : 
  invalid to change the storage mode of a factor*

Here is the data structure
> str(win.data)
List of 12
 $ cday       : num [1:349] -76.9 -76.9 -76.9 -76.9 -76.9 ...
 $ cday2      : num [1:349] 5912 5912 5912 5912 5912 ...
 $ cSoilT     : num [1:349] -8.11 -8.11 -8.11 -8.11 -8.11 ...
 $ cSoilT2    : num [1:349] 65.8 65.8 65.8 65.8 65.8 ...
 $ cRainAmt24 : num [1:349] 5.88 5.88 5.88 5.88 5.88 ...
 $ cRainAmt242: num [1:349] 34.5 34.5 34.5 34.5 34.5 ...
 $ soak24     : int [1:349] 1 1 1 1 1 1 1 1 1 1 ...
 $ RHpct      : num [1:349] 100 100 100 100 100 ...
 $ nobs       : int 349
 $ C          : int [1:349] 5 1 2 5 6 4 6 4 9 14 ...
 $ S          : int 5
 $ plot       : Factor w/ 5 levels "1","2","6","8",..: 2 1 4 5 3 4 2 1 5 3
...



Please let me know if you have any suggestions or need more info.
Thanks,
Dan Hocking
University of New Hampshire

--
View this message in context: http://r.789695.n4.nabble.com/R2WinBUGS-problem-bugs-storage-mode-error-tp3658622p3658622.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list