If I have the following string variable with these entries:
median_age_____
median_age_group1__
median_age_group23___
median_age_group23456
median_age_group234__
...
What is the best way to get the following, given that at the end of each string "_" is not consistent in terms of the number of characters it takes up?
median_age
median_age_group1
median_age_group23
median_age_group23456
median_age_group234
...
Related Posts with How to get rid of unwanted characters based on a varying pattern?
Creating a dynamic portfolio of returnsDear Statalist members, I am using Stata for the first time for my Masters Thesis and have tried to…
SADI: Sequence too longI am using SADI to do OMA. My data have 4 obervations with 3313 varialbes. When I do: oma V1-V3313, …
How to replace value of a variable with the value that appears max no of times?Hi Statalist, Apologies for the vagueness of the question. Hopefully the details would make it clea…
loop over unique values to create a sequence of consecutive numbersHi every one, I am going to loop over unique value of a date series (date1) to create a series of nu…
Drawing the IRF for 25 combinations in a loop formHello, I try to estimate and draw a chart of IRF for 25 combinations based on this model : yi,t…
Subscribe to:
Post Comments (Atom)
0 Response to How to get rid of unwanted characters based on a varying pattern?
Post a Comment