[Gretl-users] 'store' issues

Sven Schreiber svetosch at gmx.net
Sat Dec 16 15:11:05 EST 2006


Allin Cottrell schrieb:
> On Sat, 16 Dec 2006, Sven Schreiber wrote:
>> Allin Cottrell schrieb:
>>> On Fri, 15 Dec 2006, Sven Schreiber wrote:
>>
>>> The notion is that "store" is an "expert" command: the filename used is
>>> exactly what you type on the command line, so if it's not an absolute
>>> path it goes into the present working directory.  This should be
>>> documented, no doubt.

>> Or related to that: How can I find out in a script where the user
>> directory (which is set in gretl's preferences) is to use that value?
> 
> Urgh.  Why do you need that?  I suppose it could be exported to the
> environment if need be, but right now there's no way to do that, unless
> perhaps by clever use of the "!" shell command.

Well if 'store' is expert-ish, then it needs some expert information ;-)
Anyway, I would prefer if 'store' simply uses the gretl preference
setting of the user directory. At least that is what I expected first.
Now everything is clobbering the top level of my home dir. But creating
directories in a gretl script would only work via the shell AFAICS, and
that means cross-platform problems. I mean the only change would be the
point of reference for relative paths, now it's externally determined,
and it would become gretl-determined. I think the latter is better.

<snip>

> 
>> All this makes parsing gretl's csv files error-prone IMHO. I propose
>> to do one of the following two things: Either enclose _all_ strings in
>> double quotes, and have the enclosed-but-leading single quote for all
>> date values; (X)OR remove _all_ quotes, and change the separator ':'
>> to 'M', 'W', 'D' according to the data frequency, in analogy to the
>> 'Q' for quarterly data. What do you think?
> 
> Sounds reasonable.  One consideration is the possibility of
> "round-tripping".  That is, ideally if you export gretl data to CSV then
> read them back into gretl, the time-series information should be
> preserved.  I'm not sure if that's the case at present, but it's
> something I've thought of (at least intermittently) when messing with
> the exporter/importer code.

Well for monthly and weekly I think replacing the ':' by 'M' and 'W'
would help here. For higher frequencies it's probably more complicated.
Anyway, I would welcome it if gretl's csv export could become a little
more consistent in the future.

Btw, the background for all this is that I want to manage data in gretl
and then pass them to specialized python programs via temporary csv
files that are created in gretl scripts; these scripts then invoke the
python programs via the shell ('!' command). Actually I would like to
wrap those things in a fancy function package, but I found out that one
cannot use '!' in a function apparently. (Same for 'include'.) Could
that restriction be lifted?

(And if you wonder why I'm not simply doing everything in a gretl
script, the main reason is lack of object-orientation there.)

<snip>

> One possibility I've had in mind for a while is merging everything under
> "open" (scrap the "import" command and associated menu items). 
> Unfortunately, other issues (such as implementing Arellano-Bond or
> fixing the behaviour of sub-sampling commands within user-defined
> functions) have got in the way ;-)

of course it's not high priority, but it seems like a good idea to me.

Thanks for listening,
Sven




More information about the Gretl-users mailing list