Dear Statalist
I have a postcode string variable which I need to map to another geographical variable (e.g local authority, country region etc). To map to the "using" dataset, the postcode variable needs to have a space after the third character. Some of the observations do not have this - is there a way of introducing it to all observations in this variable?
e.g
Post code in the desired format:
ABC DEF
Some observations have the postcode entered as:
ABCDEF
I need to add a space after the third character (for 15,000 observations) , or it will not match with the other dataset I am trying to merge with
Any help would be greatly appreciated!
Thank you
Joe
I have a postcode string variable which I need to map to another geographical variable (e.g local authority, country region etc). To map to the "using" dataset, the postcode variable needs to have a space after the third character. Some of the observations do not have this - is there a way of introducing it to all observations in this variable?
e.g
Post code in the desired format:
ABC DEF
Some observations have the postcode entered as:
ABCDEF
I need to add a space after the third character (for 15,000 observations) , or it will not match with the other dataset I am trying to merge with
Any help would be greatly appreciated!
Thank you
Joe
Comment