I have an id variable that looks like this:
id
001410AP00
001410BP03
001570CP03
071950AP00
083950CP05
107590AP00
It is a string variable. I need to convert to a numeric variable that drops the AP, BP or CP. For example, the new variable should look like this:
id_new
00141000
00141003
00157003
07195000
08395005
10759000
Any idea how I can do this?
id
001410AP00
001410BP03
001570CP03
071950AP00
083950CP05
107590AP00
It is a string variable. I need to convert to a numeric variable that drops the AP, BP or CP. For example, the new variable should look like this:
id_new
00141000
00141003
00157003
07195000
08395005
10759000
Any idea how I can do this?
Comment