Skip to content
Prev 278753 / 398502 Next

Read TXT file with variable separation

Raphael,

This looks like fixed width format which you can read with read.fwf.

In fixed width format the columns are not separated by white space (or  
other characters), but are identified by the positition in the file.  
So in your file, for example the first field looks to contained in the  
first 2 columns of your file (the first 2 characters of every line),  
the second field in the next five columns, etc.

Regards,
Jan


Citeren Raphael Saldanha <saldanha.plangeo at gmail.com>: