请问该如何做到?本人是sas新手,对数据集中的数据循环处理完全没有头绪。
私以为以下程序应该做到,
data target;
set origin;
do _n_=1 to 1000;
if price>=lag(price) then id=0;
if price<lag(price) then id=1;
if id=1 then leave;
end;
label id='id';
run;
data one;
set target;
if id=1;
run;
结果不行,调试后发现
do _n_=1 to 1000;
语句;
end;
循环根本没用。



雷达卡







京公网安备 11010802022788号







