I am dealing with real time data from an indoor air monitor. When the monitor runs out of alcohol, the machine reads 0. I am interested in creating a subset of my data that only includes the "0" observations and the preceding 30 observations. I think I may be able to do this with some form of an IF/THEN statement before OUTPUT, but I am unsure. Maybe something like this? DATA library.air_30;
SET library.air;
IF concentration=0 then OUTPUT *previous 30 observations* library.air_30;
RUN; Can anyone offer some help with this? Thanks in advance.
... View more