On Mon, 20 May 2019, Sven Schreiber wrote:
Am 20.05.2019 um 01:55 schrieb Allin Cottrell:
> 3) Nonetheless, I find that it's not too difficult to handle the issues
> under point 2 in the context of our current CSV importation code. In
> current git, you can try out reading CSV into a matrix via mread() when
> the filename (or URL) has a ".csv" extension. Two comments on that: (a)
> "CSV" really just means delimited text, the delimiter doesn't have to
be
> comma; and (b) if we want to pursue this option we could admit some
> other filename extensions.
Sounds very good.
Excellent, thanks a lot Allin, it works flawlessly on all the exaples I
tried. Of course this makes my proposed addition to extra.gfn 100% moot,
but I suppose the code in csv2mat.inp could be somehow reused as an
example somewhere in the docs, where we show how to work with text files
and strings... by th way: has anyone else but Francesca thought about the
idea of splitting the "graphics" part from the Guide into a separate
document?
> 4) One point supported by Jack's hansl code that is not
supported by our
> built-in CSV importer is malformed CSV (e.g. some lines have more fields
> than others). I don't think we'd want to support this in our C code --
> and actually I kinda wonder about the wisdom of supporting it at all.
I agree.
Ok with me.
But which makes me think: Perhaps there is some relation to
Jack's
'sparse' package, meaning that gretl could use a way to write and read a
sparse matrix to/from a file?
Well, the "sparse" package represents sparse matrices via a bundle, so
we've got bread() and bwrite().
-------------------------------------------------------
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
-------------------------------------------------------