Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Sergiy Radyakin <serjradyakin@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Retrieving variable list from describe |
Date | Fri, 21 Jun 2013 15:29:13 -0400 |
This is incorrect: "...I know that describe provides an r(varlist) macro,..." Varlist can be obtained from ds, not des. On Fri, Jun 21, 2013 at 3:26 PM, Sergiy Radyakin <serjradyakin@gmail.com> wrote: > sysuse auto > ds > ret list > > On Fri, Jun 21, 2013 at 3:20 PM, Barth Riley <barthriley@comcast.net> wrote: >> Dear list >> >> i would like to retrieve the list of variables matching a specification used >> with describe, e.g.: >> >> describe item* >> >> I know that describe provides an r(varlist) macro, yet I can seem to use or >> access it. For instance: >> >> foreach var in "`r(varlist)'" { >> ... >> } >> >> does nothing. I have also tried not enclosing `r(vrlist)' in quotes . Does >> this only work in conjunction with the ds command? >> >> Thanks >> >> Barth >> >> * >> * 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/ * * 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/