Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: logical operator for date in variable name


From   Caleb Southworth <caleb@uoregon.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: logical operator for date in variable name
Date   Fri, 15 Sep 2006 19:17:58 -0700 (PDT)

I would like to have a list of stubs to automate reshaping some data. I
plan to -reshape long subname, i(federation) j(year)-

All the variable names have years on the end, for example

. ds
federation w_1902 w_union~1908 b_b_1914 w_1921 gal_1929 ts_1950
w_1880 foner_1902 ts_1908 b_union~1914 w_union~1921 w_1930 ts_1951 w_1881
foner_u~1902 b_st_1908 w_1915 ts_1921 w_union~1930 ts_1952 w_1882
[snip]

Is there a way to get a set or subset of stubs such as w_ w_union~ gal_ ,
etc. without typing this list explicitly?
*
*   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/



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