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: about real() function?mistakes happened when transform strings to numeric
From
Nina YIN <[email protected]>
To
[email protected]
Subject
Re: st: about real() function?mistakes happened when transform strings to numeric
Date
Wed, 11 Apr 2012 10:06:43 +0200
Thanks, KC. destring does work. Great!
I don't get it what's the problem with real().
Is there anyone know about it? Thanks.
On Tue, Apr 10, 2012 at 5:45 PM, K C Wong <[email protected]> wrote:
> how about using "destring"instead?
>
> On Wed, Apr 11, 2012 at 3:27 AM, Nina YIN <[email protected]> wrote:
>> Dear all,
>>
>> I am wondering whether you have met such situation:
>>
>> When I try to transform a string variable into numeric one, I use, for
>> example, -gen rxndc=real(ndc)
>> Then I hope that it will change the type of the variable, and after
>> that, I could merge two datasets using rxndc which is the same type in
>> both datasets.
>> The strange thing is that, this command worked well in my laptop,
>> while in the university server, it failed, the numeric variable rxndc
>> wasn't consistent with the string one "ndc".
>> If you have any idea, could you kindly give me any suggestions?
>> Thanks in advance!
>>
>> --
>> Best Regards,
>> Nina YIN
>> *
>> * 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/
--
Best Regards,
Nina YIN
Toulouse School of Economics
Manufacture des Tabacs
21 Allee de Brienne
Toulouse, 31000, France
Tel: 0033-(0)5 6123 8348
*
* 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/