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

From: Blanchard, Suzette <SBlanchard_at_coh.org>
Date: Mon, 07 Apr 2008 19:30:57 -0700


      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


[1] 140  


[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?  

Thank you,


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

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. Received on Tue 08 Apr 2008 - 03:43:55 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:26 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