Re: [R] Error: expected the collection operator c error pos 98 (error on line 1)

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Thu, 10 Apr 2008 12:13:04 +0200

Blanchard, Suzette wrote:
> Greetings,
>
>
>
> I implemented BRugs to run the EWOC model with a cohort size N=1. I output the simulation data using bugsdata(data), where data is the following list.
>
>
>

>> data

>
> $Dose
>
> [1] 140
>
>
>
> $Y
>
> [1] 0
>
>
>
> bugsdata(data) puts out the file data.txt as follows.
>
>
>
> list(Dose=1.40000E+02, Y=0.00000E+00)
>
>
>
> after I type the following line
>
> modelData("data.txt") # read data file
>
>
>
> I get the ERROR:
>
> expected the collection operator c error pos 98 (error on line 1)
>
>
>
> If I rewrite the file
>
>
>
> list(Dose=c(1.40000E+02), c(Y=0.00000E+00))
>
>
>
> it runs fine. Can you suggest a way to get the output dataset to automatically put the
>
> c( ) on the data when the sample size is 1?

Hmmm, I will take a look how to implement it.

I guess you have modeled Y to be a vector by indexing with brackets in your BUGS model? It works for me if I use Y without index brackets in a BUGS model file.

Best wishes,
Uwe

>
>
> Thank you,
>
> Suzette
>
>
>
> Suzette Blanchard, Ph.D.
> Assistant Professor, Dept. of Biostatistics
> City of Hope
> 1500 East Duarte Rd
> Duarte, CA 91010-3000
> ph: (626) 256-4673 ext:64446
> sblanchard_at_coh.org
>
>
>
> ---------------------------------------------------------------------
>
> SECURITY/CONFIDENTIALITY WARNING: \ This message an...{{dropped:24}}
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 10 Apr 2008 - 10:44:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Apr 2008 - 11:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive