delimiter for data files in text format
by Riccardo (Jack) Lucchetti
This has been dabeted several times, but IMO the issue still remains.
A colleague was trying to use gretl to import a dataset (with extension
.txt, but that doesn't really matter) whose first lines look like this:
"num"|"x"|"y"|"z"
"1"|0.273856207444503|-0.036672201779096|0.854726937504524
"2"|2.24481689268639|-0.546030016142993|0.23406506726493
"3"|-0.125423034417563|-0.606878201926287|-0.853921693817499
"4"|-0.54357344128812|1.10835827274681|-0.104247994046094
"5"|-1.45939839398061|-0.274494522530397|0.111905961611328
Eventually, we managed to solve the problem by manually editing the file
and replacing pipe characters by commas, but it would have been nice to
have an option to give the CSV importer the delimiter character to split
columns.
This would also solve cases when you get a mish-mash of commas and
semi-colons, like in (pseudo-)CSV files produced by national versions of
some spreadsheets.
Allin, I think I remember you were against this feature for some reason,
but I can't recall what it was. Could you please remind me? Thanks!
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------