[R] read.fwf and header

François Pinard pinard at iro.umontreal.ca
Thu Nov 2 02:21:11 CET 2006


[Martin Maechler]

>In my (and probably R-core's) view, read.fwf() should only have
>to be used for ``legacy data files'' (those times when people used *no*
>separators in order to save disk space), since nowadays, such
>data files should "automatically" have correct separators. 

In my day-to-day experience, the main virtue for fixed width format 
files is basic, humble legibility, much more than disk space savings.  
The FWF files I see have delimiters between fields, but also embedded 
space within fields, or at end of fields, without extraneous quotes.  
XML markup, CSVs, quoted fields, etc. are devices meant for helping 
machines much more than for helping humans.  They significantly decrease 
legibility.  Humans not only know better, they decipher fixed width 
format easily enough for not really needing hairier devices in general.

FWF files may be archaic, they are not obsolescent.  They will resist 
the fashion of the day for complexity, and survive in the long run.

-- 
François Pinard   http://pinard.progiciels-bpi.ca



More information about the R-help mailing list