Re: [R] Multiple vector elements into one character element

2013-09-25 Thread arun
Hi, May be this helps: y<- aggregate(Day~Month,data=x,paste,collapse=",") write.table(y,"file.txt",quote=FALSE) A.K. - Original Message - From: "Lietz, Haiko" To: "'r-help@r-project.org'" Cc: Sent: Wednesday, September 25, 20

Re: [R] Multiple vector elements into one character element

2013-09-25 Thread Bert Gunter
Perhaps ?dput -- Bert On Wed, Sep 25, 2013 at 6:10 AM, Lietz, Haiko wrote: > Hi all, > > I want to collapse multiple elements of a vector into a single > comma-separated character element. I only know how to create a list of the > original elements, but I have not managed to write this into a

[R] Multiple vector elements into one character element

2013-09-25 Thread Lietz, Haiko
Hi all, I want to collapse multiple elements of a vector into a single comma-separated character element. I only know how to create a list of the original elements, but I have not managed to write this into a text file, which is necessary. To illustrate, let's use the airquality dataset and ext