Hi,
I have a dataset where the variable id is stored as a str9, although this id has only 8 characters of lenght in some registers. I have something like this (below). The id "00831782" has a lenght of 9 although it has only 8 characters and also it has been stored as a str9. I can see that there is a blank at the end of this registers so it counts them with a lenght of 9 (the are like stucked to the left in the browser). How I can remove this blank space at the final of this registers to identify the real lenght?
Im trying to merge this registers with another database but i cant because this registers have been stored as str9 and have only 8 characters while in the other database the are stored as str8.
id / length
000532048 / 9
000371958 / 9
001246584 / 9
00831782 / 9
01322658 / 9
01323954 / 9
I would really appreciate if you could help me.
Related Posts with Change the lenght of a string
clustered standard error with IVDear all I am estimating IV model. I would like to cluster at the village level We have only two vi…
how to count the distribution of industry in the sampleHi, I would like to have an overview of the industry distribution in my sample to see which industr…
Panel Data Question I could not find in any bookHi All, I have read several manuals on panel data econometrics but I never found the answer to thes…
Manual SE adjustment for 2SLS with clusteringHello, I'd like to manually estimate a two-stage least squares regression, first running the first …
Random sampleHello to all, I try to learn stata by myself as a economist, So I want to make a boucle to make a r…
Subscribe to:
Post Comments (Atom)
0 Response to Change the lenght of a string
Post a Comment