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: AW: create a dataset or vector of variable names
From
Scott Merryman <[email protected]>
To
[email protected]
Subject
Re: st: AW: create a dataset or vector of variable names
Date
Wed, 24 Feb 2010 10:39:23 -0600
See also:
http://www.stata.com/statalist/archive/2008-05/msg00352.html
Scott
On Wed, Feb 24, 2010 at 10:36 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
>
>
> *************
> sysuse auto, clear
> d, varlist
> gen str30 varnames=""
>
> loc i 1
> foreach var of varlist `r(varlist)'{
> replace varnames="`var'" in `i'
> loc ++i
> }
>
> keep varnames
> l in 1/20
> *************
>
>
>
> HTH
> Martin
>
>
*
* 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/