/* aug25.ex4 */ /* read Amy Nail's test file */ /* compute running means and let */ /* proc means compute daily max */ /* */ /* make pointer to directory */ /* */ libname amy '.' ; * already at the directory ; /* */ /* two step process */ /* make 8-hour rolling ave's */ /* then means to get max */ data a ; drop co ald2 hourlst ; set amy.smoke36_forjm ; if( hourlst lt 7 ) then delete ; * skip this obs ; cor8ave = (co + lag(co) + lag2(co) + lag3(co) + lag4(co) + lag5(co) + lag6(co) + lag7(co))/8 ; alr8ave = (ald2 + lag(ald2) + lag2(ald2) + lag3(ald2) + lag4(ald2) + lag5(ald2) + lag6(ald2) + lag7(ald2))/8 ; run ; /* */ /* proc means for each day's max */ proc means data=a max noprint nway ;* nway !!!! ; class grid36id datelst ; output out=b max= ; run ; /* */ /* print the top */ proc print data=b (obs=20) ; title 'top of dataset' ; run ; /* */ /* print the bottom */ proc print data=b (firstobs=10900) ; title 'bottom of dataset' ; run ;