Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Long integer as string bugaboo


From   "Wallace, John" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: Long integer as string bugaboo
Date   Wed, 19 May 2004 13:02:56 -0700

Sorry to rehash old problems, but several archive searches haven't been on-point enough at the moment.  The problem is I have a serial number that I want to parse into two different variables.  The serial is stored as double, but when I try to -string()- it I get the following:

 

In:

numvar

123456001

123457001

123458001

 

.gen var1=substr(string(numvar),1,6)

 

out:

var1

1.23e+

1.23e+

1.23e+

 

I know I dealt with this once in the past, but I can't remember how I handled it.

 

John Wallace | Research Associate | Test Method Development

AFFYMETRIX, INC. | 3380 Central Expressway | Santa Clara, CA 95051 | Tel:  408-731-5574 | Fax:  408-481-0435

 




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