On Sun, 27 Sep 2015, Schaff, Frederik wrote:
Hello everybody,
I have a data-set with some non-numeric values according to gretl (but not to CSVed).
[1]: Problematic values (examples):
4.13108e-312 5.27295e-270 4.3172e-227 1.51922e-184 3.97655e-142 1.42149e-144 1.94409e-143 2.79222e-144
(These values stem from uninitialised double variables in my c++ model, I guess).
Is there an option unbeknown to me to simply substitute such
non-numerics by Gretl "NA" directly with the import? I.e. make the error
messages quiet and gretl process nonetheless?
I cannot find one and an old request
(
http://sourceforge.net/p/gretl/feature-requests/47/) is long closed...
In principle, anything is possible, since in Hansl you get several
string-related function for importing your file as a big string and
manipulating it later.
However, if you're using a Unix-like system (Linux, BSD, OSX...) you might
want to pre-process the data and produce a more user-friendly csv file via
the trusty, old, all-powerful unix tools. Or at least, that's what *I*
would do. Something like
sed yourdata.csv -e 's/[0-9].[0-9]*[Ee]-[1-3][0-9]2/NA/g' > cleandata.csv
-------------------------------------------------------
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
-------------------------------------------------------