Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Retrieving variable list from describe


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Retrieving variable list from describe
Date   Fri, 21 Jun 2013 23:50:32 +0100

This in turn is incorrect, as Phil Schumm pointed out.

-describe, varlist- produces r(varlist)

The reason Sergiy is saying this is presumably that it was true for
some while that -describe- did not produce r(varlist), even
optionally, bu StataCorp did fix that a few years ago.

Nick
[email protected]

On 21 June 2013 20:29, Sergiy Radyakin <[email protected]> wrote:

> 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 <[email protected]> wrote:

>> sysuse auto
>> ds
>> ret list

On Fri, Jun 21, 2013 at 3:20 PM, Barth Riley <[email protected]> wrote:

>>> 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(varlist)' in quotes . Does
>>> this only work in conjunction with the ds command?
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index