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   "Eva Poen" <[email protected]>
To   [email protected]
Subject   Re: st: A query on geeting the list of ALL variables.
Date   Mon, 25 Aug 2008 12:38:24 +0100

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



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