[R] exporting tapply objects to csv-files

2008-09-09 Thread Kunzler, Andreas
Dear Everyone, I try to create a cvs-file with different results form the table function. Imagine a data-frame with two vectors a and b where b is of the class factor. I use the tapply function to count a for the different values of b. tapply(a,b,table) and I use the table function to have a

Re: [R] exporting tapply objects to csv-files

2008-09-09 Thread Henrique Dallazuanna
Try creating a new object: tb - rbind(table(a), do.call(rbind.data.frame, tapply(a, b, table))) names(tb) - unique(a) then write to csv by write.table. On Tue, Sep 9, 2008 at 5:48 AM, Kunzler, Andreas [EMAIL PROTECTED] wrote: Dear Everyone, I try to create a cvs-file with different results

Re: [R] exporting tapply objects to csv-files

2008-09-09 Thread hadley wickham
On Tue, Sep 9, 2008 at 3:48 AM, Kunzler, Andreas [EMAIL PROTECTED] wrote: Dear Everyone, I try to create a cvs-file with different results form the table function. Imagine a data-frame with two vectors a and b where b is of the class factor. I use the tapply function to count a for the