[Gretl-devel] Regarding the dataset command (Was: Feature request
for sorting of variables)
Riccardo (Jack) Lucchetti
r.lucchetti at univpm.it
Thu Oct 4 03:21:25 EDT 2007
On Thu, 4 Oct 2007, andreas.rosenblad at ltv.se wrote:
> Could you also add another option under the "dataset" command, e.g.
> "dataset deleteobs <parameter>", where e.g. "dataset deleteobs 3, 5, 11-22"
> would delete observations 3, 5 and 11-22 from the data set (i.e. from all
> variables in the data set) and "dataset deleteobs x>0" would delete all
> observations where x>0 from the dataset.
This is an excellent idea IMO. In fact, it would be nice to make this a
little more systematic. What I have in mind is a rough equivalent of
Stata's "drop" and "keep" commands.
How would you like something like the following?
dataset <subcommand> <argument>
where <subcommand> could be either "delete", "keep", "deleteobs" or
"keepobs". The first two refer to variables (columns) and have a list as
the argument, the last two to observations (rows) and the argument follows
the same conventions we now use for the "smpl" command (with all the
caveats when applied to a time-series dataset).
By the way, this change would make obsolete the current "delete" command,
which is a bad thing in the short term because of backward compatibility
needs, but good in the long term because the less reserved words we have,
the better.
Comments?
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti at univpm.it
http://www.econ.univpm.it/lucchetti
More information about the Gretl-devel
mailing list