Statalist


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

st: Add


From   Tiago Fonseca <tiago.p.fonseca@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Add
Date   Mon, 15 Feb 2010 19:19:42 +0000

How can I add a number to a real by its parity?
I have a 5 digits code and I want to generate 6 digits code where the last digit is:
0 if the 5 digits number end at 0 or a even number
5 if the 5 digits number end in a even number.

Regards,
Tiago Fonseca
*
*   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