On Thu, 4 Oct 2007, andreas.rosenblad(a)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(a)univpm.it
http://www.econ.univpm.it/lucchetti