Date: Thu, 13 May 2004 11:53:22 -0400
Reply-To: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject: Re: Scientific notation
On Thu, 13 May 2004 11:42:10 -0400, CHRISTENSEN,KEVIN W <chriske2@UFL.EDU>
wrote:
>I have a SAS dataset that looks like the following:
>
>COUNTRY POPULATION
>USA 1000000
>CHINA 1.0016E+07
>JAPAN 2.0616E+07
>TURKEY 2351522
>
>The population variable is read in as a character and I'd like to
>read it as a number. Unfortunately the scientific notation in
>some observations will make it difficult (I think). Any ideas
>around this?
>--
>CHRISTENSEN,KEVIN W
You should not expect any problems! Try
data a;
input
c: $10.
n: best10.;
cards;
USA 1000000
CHINA 1.0016E+07
JAPAN 2.0616E+07
TURKEY 2351522
;
run;
Result is:
Obs C N
1 USA 1000000
2 CHINA 10016000
3 JAPAN 20616000
4 TURKEY 2351522
|