Prev: Barchart with Graph Template Language
Next: Reshaping the data to run the simple correlation analysis
From: Nathaniel Wooding on 20 Nov 2009 15:53 I have been working today on a data file that dates back to the 1970s and h= as spent much of its life on a mainframe=2E I am in the process of preparin= g it for migration to an IT supported database and am cleaning up some glit= ches that have crept in over the years=2E In particular, I have been focus= ed on several ids with the values 92=2E2 , 92=2E3 and 92=2E4=2E I was usin= g code similar to=0D=0A=0D=0AIf station in(92=2E2 , 92=2E3, 92=2E4) then do= ;=0D=0A=0D=0AEtc=0D=0A=0D=0ATo make some corrections to some of the obs wh= ere a particular variable was not coded uniformly=2E Out of about 400 recor= ds in this group, all but two behaved themselves and were fixed=2E After a = couple hours double checking my logic and trying to trap the reason that th= ese two obs were not behaving themselves, I finally added the statement=0D= =0A=0D=0AStation =3D Round( station , =2E1);=0D=0A=0D=0AAnd my program star= ted working! So, I had decimals that were not stored as they appeared ( 92= =2E3999999999 is, to a human, 92=2E4, etc )=2EWere I to start this particu= lar data set again, I would most likely avoid the decimal issue but way bac= k when I first set up the coding scheme, I never anticipated the need to ha= ve as many ids as we later came to need=2E In all my years of working with = these data, I have never stumbled on a problem of the decimal representatio= n not behaving itself=2E I suppose that something may have happened to thes= e two obs when I used Proc Download to bring the data to my pc so I'll blam= e the lousy day on that=2E=0D=0A=0D=0AIn any case, for those contemplating = numeric ids with decimals, beware=2E And, for that matter, perhaps characte= r ids are better after all=2E=0D=0A=0D=0AHave a very good weekend and, for = those in the US, have a great Thanksgiving next week=2E=0D=0A=0D=0ANat=0D= =0A=0D=0A=0D=0ANat Wooding=0D=0AEnvironmental Specialist III=0D=0ADominion,= Environmental Biology=0D=0A4111 Castlewood Rd=0D=0ARichmond, VA 23234=0D= =0APhone:804-271-5313, Fax: 804-271-2977=0D=0ACel Phone: 804-205-0752=0D=0A= =0D=0A=0D=0A=0D=0ACONFIDENTIALITY NOTICE: This electronic message contains= =0Ainformation which may be legally confidential and or privileged and=0Ado= es not in any case represent a firm ENERGY COMMODITY bid or offer=0Arelatin= g thereto which binds the sender without an additional=0Aexpress written co= nfirmation to that effect=2E The information is=0Aintended solely for the = individual or entity named above and access=0Aby anyone else is unauthorize= d=2E If you are not the intended=0Arecipient, any disclosure, copying, dis= tribution, or use of the=0Acontents of this information is prohibited and m= ay be unlawful=2E If=0Ayou have received this electronic transmission in e= rror, please=0Areply immediately to the sender that you have received the m= essage=0Ain error, and delete it=2E Thank you=2E |