[R] problem in R2JAGS

thanoon younis thanoon.younis80 at gmail.com
Wed Feb 25 04:26:59 CET 2015


Hi everyone,

I need your help to correct R code using R2JAGS. The problem is when i
defined testJAGSdata which contains on all the data as following


testJAGSdata <- read.bugsdata("bugsdata.R")
bugsdata.R<-read.table("F:/JAGS/bugsdata.R")

i found this error

> testJAGSdata <- read.bugsdata("bugsdata.R")
Error in file(filename, "r") : cannot open the connection
In addition: Warning message:
In file(filename, "r") :
  cannot open file 'bugsdata.R': No such file or directory
> bugsdata.R<-read.table("F:/JAGS/bugsdata.R")
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
 :
  line 2 did not have 3 elements

and

Error in jags(data = testJAGSdata, inits = testJAGSinits, model.file =
"testJAGS.txt",  :
  object 'testJAGSdata' not found

How can i solve this problem? because i think the problem in bugsdata.R but
this file works correctly.

Any help would be highly appreciated

Many thanks in advance



-- 
Thanoon Y. Thanoon
PhD Candidate
Department of Mathematical Sciences
Faculty of Science
University Technology Malaysia, UTM
E.Mail: Thanoon.younis80 at gmail.com
E.Mail: dawn_prayer80 at yahoo.com
Facebook:Thanoon Younis AL-Shakerchy
Twitter: Thanoon Alshakerchy
H.P:00601127550205

	[[alternative HTML version deleted]]



More information about the R-help mailing list