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
panel data with cross sectional dependence and autocorrelationI have a panel data with N>T (N=157, T=15). Have taken log of a few variables to make it Heterosc…
How to graph the moderating effect(moderator: dummy variable) of a quadratic model?Dear specialists, I really thank everyone here sparing no efforts to help me. I have a censored da…
Table command in Stata 17: add column name to first columnHi, I'm exploring the new table and collect commands in Stata 17, and find that it has many useful …
floatplot -legend- optionDear Nick Cox , I have started using your -floatplot- from SSC program. I really like to use it more…
Regarding Interval data (generating more years and duplicating values)Dear, Can anyone help me to manage the data? I have interval data. Since the data are only availabl…
Subscribe to:
Post Comments (Atom)
0 Response to Change the lenght of a string
Post a Comment