Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: referring to groups of variables by suffixes


From   Michael Stewart <michaelstewartresearch@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: referring to groups of variables by suffixes
Date   Wed, 28 Nov 2012 07:48:36 -0500

Dear Statalist reader,

I am working with a large dataset (approx 600 variables) with
different names but some of them end in similar manner

Eg:
procedure__11_procedure_code___i
procedure__11_procedure_date
procedure__11_procedure_or_ind
procedure__11_procedure_tissue_t
procedure__11_procedure_type
procedure__12_procedure_abnormal
procedure__12_procedure_code_icd
procedure__12_procedure_date
procedure__12_procedure_ep_no
procedure__12_procedure_location
procedure__12_procedure_or_ind
procedure__12_procedure_physicia
procedure__12_procedure_tissue_t
procedure__12_procedure_type
procedure__12_procedure_type0
procedure__13_procedure_abnormal
procedure__13_procedure_anes_age
procedure__13_procedure_anes_met
procedure__13_procedure_code_icd
procedure__13_procedure_date

I want to drop variables ending with procedure_tissue_t and
procedure_anes_age. Its tedious to do it for large number of
variables.Can you please suggest a shortcut . Is there  a shortcut to
refer to all variables ending with procedure_tissue_t &
procedure_anes_age.I found shortcuts to refer to variables for
prefixes  but not for suffixes so far.

-- 
Thank you ,
Yours Sincerely,
Mike.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index