Hi,
I would like to ask again the same question for sorting the observations by descending orders and only keep the first observation.
For instance, the data looks like this:
Code:
State County Programtype Begin Date 1 2 6 2007/01/01 1 2 6 2008/01/01 1 2 5 2009/01/01 2 3 4 2006/01/01 2 3 3 2008/01/01 2 3 3 2011/01/01
I would like to first sort the data and keep only 1 observation by state/county/programtype with the most recent begin start date.
When I tried the code, this did not work with my example, saying that the variables are already defined.
is there an alternative way to solve this?
Thank you very much for your help!
I would like to ask again the same question for sorting the observations by descending orders and only keep the first observation.
For instance, the data looks like this:
Code:
State County Programtype Begin Date 1 2 6 2007/01/01 1 2 6 2008/01/01 1 2 5 2009/01/01 2 3 4 2006/01/01 2 3 3 2008/01/01 2 3 3 2011/01/01
I would like to first sort the data and keep only 1 observation by state/county/programtype with the most recent begin start date.
When I tried the code, this did not work with my example, saying that the variables are already defined.
Originally posted by William Lisowski
View Post
Thank you very much for your help!
Comment