[R] Exporting each row in the table as new table

PIKAL Petr petr.pikal at precheza.cz
Fri Oct 12 09:16:05 CEST 2012


Hi

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of kallu
> Sent: Thursday, October 11, 2012 3:05 PM
> To: r-help at r-project.org
> Subject: [R] Exporting each row in the table as new table
> 
> Dear all,
> 
> I am new to R and I am familiar with very basic stuff. I am trying to
> create tables in text format from each row of my table and export these
> tables with specific attribute in the table. I tried after reading some
> forums but nothing worked. Can you please help me.
> 
> ex:
> dataGT
> 
> ID	State	Year	Growth
> 1	IA	1999	25
> 2	IA	2000	27
> 3	KS	1999	35
> 4	KS	2000	31
> 5	KY	1999	14
> 6	KY	2000	18
> 7	NE	1999	34
> 8	NE	2000	38
> 
> I am trying to have each row of the table as new table and need to
> export that table with name of of the ID.
> 
> Please help me if possible. Thank you
> Kalyani

Well, be more specific. How do you want the output by formated based on above example. From what you say it seems to me that you want

split(dataGT, dataGT$id)

but cut me into pieces if I know why.

Regards
Petr



> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Exporting-
> each-row-in-the-table-as-new-table-tp4645844.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.




More information about the R-help mailing list