Dear experts,
I have a table like this:
Year Violation Year
2010 2005,2006,2007,2008,2009,2010
Both "Year"and "Violation Year" are string. How can I extract the multiple years in "Violation Year" seperately to make the below happen?
Year Violation Year
2010 2005
2010 2006
2010 2007
2010 2008
2010 2009
2010 2010
Thank you so much!
Related Posts with Extract different parts from one variable
egen and mean help neededDear all, I am dealing with a micro data where I have around 100000 observations from 81 cities abou…
Reshape error: variable id does not uniquely identify the observationsDear All, I am trying to use the reshape command on the data attached, but I keep receiving this er…
replace the value of variableHi, I am new to Stata. In my case, I have a variable equal to 1, 2,3,4,5 and my task is to make the …
Check whether -moremata- is installedWhen writing .do-files which make use of user written commands, first I check whether these programs…
ARDL and estimating a shock for dummyDear all, I am trying to estimate the effect of an observed trade shock (the entrance of China in W…
Subscribe to:
Post Comments (Atom)
0 Response to Extract different parts from one variable
Post a Comment