[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: keep
Hi Statalisters,
Is there a way to let the keep command do the following?
I want to keep, let's say, three variables v1 v2 v3 before saving data,
but all these three variables do not exist in all data sets for which I
want to run the command (I want to do this with a loop using many data
sets and I use global to define the variables).
I could drop variables instead using "capture drop v4" etc, but that
would become a very long do file.
Cheers
Erik
--
Erik Bihagen
Swedish Institute for Social Research
Stockholm University
SE-106 91 Stockholm
Phone: +46 8 16 26 51
Fax: +46 8 15 46 70
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/