Hello,
I'm looking for each state's first week and last week in the sample dataset. Please help. Thanks.
data Have;
length State $5 Week 3;
infile datalines delimiter=',';
input State Week;
datalines;
GA,2101,
GA,2102,
GA,2104,
GA,2105,
GA,2106,
GA,2109,
GA,2110,
GA,2115,
GA,2117,
GA,2118,
GA,2120,
GA,2123,
GA,2124,
NV,2201,
NV,2202,
NV,2204,
NV,2205,
NV,2206,
NV,2209,
NV,2210,
NV,2213,
;
data want_week_1st_last;
length State $5 Week_start 3 Week_end 3;
infile datalines delimiter=',';
input State Week_start Week_end;
datalines;
GA, 2101,2124,
NV, 2201,2213,
;
... View more