[R] read file problem

Philipp Pagel philipp.pagel.lists at t-online.de
Fri Nov 3 16:33:34 CET 2006


On Fri, Nov 03, 2006 at 02:02:35PM +0000, Luis Ridao Cruz wrote:

> DEPTH  CTDPRS  CTDTMP  CTDSAL  RAWFLU NUMB. QUAL
>     M    DBAR IPTS-68  PSS-78          OBS.
>       ******* ******* ******* *******
>     1     1.0                               2999
>     2     2.0  5.9793 35.1629    .107    17 2221
>     3     3.0  5.9797 35.1631    .101    17 2221
>     4     4.0  5.9809 35.1631    .118    12 2221
>     5     5.1  5.9811 35.1629    .115    42 2221
>     6     6.1  5.9810 35.1631    .116    18 2221
>     7     7.1  5.9797 35.1631    .116    15 2221
>     8     8.1  5.9798 35.1630    .102    13 2221
>     9     9.1  5.9792 35.1629    .113    11 2221

> read.table(file, skip = 10)

To me it looks like your data is in a fixed-width format. If that is the
case you should use read.fwf() instead of read.table().

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
http://mips.gsf.de/staff/pagel



More information about the R-help mailing list