Hello list,
I am having a strange problem converting strings into numerical
format. I have a string which by all appearances is just a number. I
used trim() to make sure there weren't any hidden spaces, and then
attempted to -destring- again but with no luck. Trim indicates that
there weren't any changes made upon -trim-ing again...
If I -destring, force- I do get missing values for the majority of
values which appear to be trimmed numbers.
the file is at:
http://www.geocities.com/verbosemonkey/stata/sonj.zip
*****************************
foreach var of varlist _all {
replace `var'=trim(`var')
}
destring rank, replace
destring rank, gen(nrank) force
tab rank if nrank==.
****************************
Are there other "hidden" characters which could be preventing
-destring- which I can erase?
There definitely seem to be in my copy. If you -list- this dataset, then
you see numerous question marks, which are probably hidden characters, and
also a lot of "/" characters.