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?
Measuring duration between age 13 and 19Hi people, Supposed i want to measure marriage timing among pregnant and non pregnant adolescents (a…
Query about interaction terms in fixed effects panel dataHi, I have a question about fixed effects panel data interaction terms: Here is my code, xtreg D…
Problems with panel dataI am new to stata and I trying to run a regression to understand demographic roles in unemployment, …
How to Keep Duplicated Variables based on the Value of another ColumnHello all! I am working on cleaning up a dataset, and I do not know how to do so. Here are some of …
Create a variable to indicate overlappingHello all, I have the dataset as follows. In each observation I have carrier, time(yq), and market(…
Subscribe to:
Post Comments (Atom)
0 Response to How to get rid of unwanted characters based on a varying pattern?
Post a Comment