Well, the data is generated by a perl script, and I could just configure the 
perl script so that there is one file per data table, but I though I'd probably 
must more efficent to have all records in a single file rather than reading a 
thousands of small files ... .

        kind regards,

        Arne

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Philipp Pagel
Sent: Wednesday, March 08, 2006 12:44
To: [email protected]
Subject: Re: [R] data import problem


On Wed, Mar 08, 2006 at 12:32:28PM +0100, [EMAIL PROTECTED] wrote:
> I'm trying to read a text data file that contains several records
> separated by a blank line. Each record starts with a row that contains
> it's ID and the number of rows for the records (two columns), then the
> data table itself, e.g. 
> 
> 123 5
> 89.1791    1.1024
> 90.5735    1.1024
> 92.5666    1.1024
> 95.0725    1.1024
> 101.2070    1.1024
> 
> 321 3
> 60.1601    1.1024
> 64.8023    1.1024
> 70.0593    2.1502

That sound like a job for awk. I think it will be much easier to
transform the data into a flat table using awk, python or perl an then
just read the table with R. 

cu
        Philipp

-- 
Dr. Philipp Pagel                            Tel.  +49-8161-71 2131
Dept. of Genome Oriented Bioinformatics      Fax.  +49-8161-71 2186
Technical University of Munich
Science Center Weihenstephan
85350 Freising, Germany

 and

Institute for Bioinformatics / MIPS          Tel.  +49-89-3187 3675
GSF - National Research Center               Fax.  +49-89-3187 3585
      for Environment and Health
Ingolstädter Landstrasse 1
85764 Neuherberg, Germany
http://mips.gsf.de/staff/pagel

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to