[R] Print/Save/Cat/Write list

2006-09-30 Thread Ritwik Sinha
Hi, I would like to write a list to an ascii file. I tried the following y - list(a = 1, b = c(TRUE,FALSE), c = oops) save(y, file=y.data, ascii=TRUE) # Not satisfactory print does not have a file= option cat cannot handle lists. write does not handle lists write.table converts it to a d.f

Re: [R] Print/Save/Cat/Write list

2006-09-30 Thread jim holtman
try: sink(y.data) y sink() On 9/30/06, Ritwik Sinha [EMAIL PROTECTED] wrote: Hi, I would like to write a list to an ascii file. I tried the following y - list(a = 1, b = c(TRUE,FALSE), c = oops) save(y, file=y.data, ascii=TRUE) # Not satisfactory print does not have a file= option cat

Re: [R] Print/Save/Cat/Write list

2006-09-30 Thread Rolf Turner
?sink __ R-help@stat.math.ethz.ch 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.

Re: [R] Print/Save/Cat/Write list

2006-09-30 Thread Ritwik Sinha
thanks. Ritwik. On 9/30/06, jim holtman [EMAIL PROTECTED] wrote: try: sink(y.data) y sink() On 9/30/06, Ritwik Sinha [EMAIL PROTECTED] wrote: Hi, I would like to write a list to an ascii file. I tried the following y - list(a = 1, b = c(TRUE,FALSE), c = oops) save(y,

Re: [R] Print/Save/Cat/Write list

2006-09-30 Thread Gabor Grothendieck
Check out ?dput On 9/30/06, Ritwik Sinha [EMAIL PROTECTED] wrote: Hi, I would like to write a list to an ascii file. I tried the following y - list(a = 1, b = c(TRUE,FALSE), c = oops) save(y, file=y.data, ascii=TRUE) # Not satisfactory print does not have a file= option cat cannot