[R] Reading multiple tables from file

From: G. Draisma <g.draisma_at_erasmusmc.nl>
Date: Thu, 08 May 2008 13:40:13 +0200


Dear R-users,
I have output files having a variable number of tables in the following format:



1
Pietje
I1 I2 Value
1  1  0.11
1  2  0.12
2  1  0.21

2
Jantje
I1 I2 I3 Value
1 1 1 0.111
3 3 3 0.333
...


Would there be an easy way
of turning this into (a list of) data.frames with names Pietje, Jantje
and variables I1,I2,...Value?

(I1,I2 are string or categorical,
Value is double).

I used an sed script to extract the tables from the file into separte file,
but would rather be able to process

the output files directly.

Thanks,
Gerrit.

-- 
Gerrit Draisma
Department of Public Health
Erasmus MC, University Medical Center Rotterdam
Room AE-103
P.O. Box 2040 3000 CA  Rotterdam The Netherlands
Phone: +31 10 7043124 Fax: +31 10 010-7038474
http://mgzlx4.erasmusmc.nl/pwp/?gdraisma

______________________________________________
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 Thu 08 May 2008 - 11:43:10 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 08 May 2008 - 19:30:39 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