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: How can I put the numerical values of a variable into a numlist?


From   Michael Norman Mitchell <[email protected]>
To   [email protected]
Subject   Re: st: How can I put the numerical values of a variable into a numlist?
Date   Mon, 10 May 2010 23:47:08 -0700

Dear Antonis

  Does this example help?

. sysuse auto
(1978 Automobile Data)

. levelsof mpg
12 14 15 16 17 18 19 20 21 22 23 24 25 26 28 29 30 31 34 35 41

. local a = r(levels)

. di "`a'"
12 14 15 16 17 18 19 20 21 22 23 24 25 26 28 29 30 31 34 35 41

Best regards,

Michael N. Mitchell
See the Stata tidbit of the week at...
http://www.MichaelNormanMitchell.com

On 2010-05-10 10.43 PM, A Loumiotis wrote:
Dear Statalist,

Is there any way to put the numerical values of a variable into a
numlist beside doing it manually?

Thanks,
Antonis Loumiotis
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index