Statalist


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

Re: st: A query on geeting the list of ALL variables.


From   "Ashim Kapoor" <ashimkapoor@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: A query on geeting the list of ALL variables.
Date   Mon, 25 Aug 2008 17:15:27 +0530

Thank you so much for your prompt reply. I need it to loop over all variables.

Thank you once again,
Ashim. :  )

Have a wonderful day!

On Mon, Aug 25, 2008 at 5:08 PM, Eva Poen <eva.poen@gmail.com> wrote:
> Ashim,
>
> what do you need the list for? -describe- will give you the list,
> along with data types and labels.
> If you want to loop over all variables in your dataset, you can do
>
> foreach x of varlist * {
>  ... whatever...
> }
>
> Also, -ds- will return the list of variables in the macro r(varlist).
>
> Hope this helps,
> Eva
>
>
> 2008/8/25 Ashim Kapoor <ashimkapoor@gmail.com>:
>> Hello everyone,
>>
>> I have a query. Is there a way where I can get the list of ALL
>> variables names in a dataset  ?
>>
>> Thank you all for your help,
>> Have a wonderful day!
>> Ashim.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/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