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

st: RE: Conversion to Hexadecimal


From   "Cruces,GA (pgr)" <G.A.Cruces@lse.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Conversion to Hexadecimal
Date   Sun, 20 Jul 2003 20:23:59 +0100

Many thanks to N. Cox for the accurate answer to my problem.

I just want to make clear why I prefer a string id over a numerical id.
While I can store it as a long or double with no precision problems,
I've had some difficulties with some operations. For instance, I
sometimes need to egen - concat (say, "household id" and "person number"
to get "perdon id") and I've had "rounding" problems with that, and
being a number I cannot gen strX pid=hid+pernumber...

Though certainly the numerical is the most memory efficient way to store
an identifier, I felt a short string id might be a good compromise. I
will try to use the code provided to develop a "XXdecimal" system where
instead of using only A to F I can use all letters (does that have an
official name?).

Thanks again

Best,

Guillermo Cruces


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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