k******w 发帖数: 269 | 1 CODE GRADE
A 1
A
A
B 2
B 2
B
C 3
C
C
有缺失值,如果要删除GRADE=1 所对应的所有的CODE, 该怎么做呢?谢谢啦 | D******n 发帖数: 2836 | 2 data a2(drop = qq);
retain qq;
set a1;
if (grade = 1) then qq = code;
if (code = qq ) then delete;
run;
【在 k******w 的大作中提到】 : CODE GRADE : A 1 : A : A : B 2 : B 2 : B : C 3 : C : C
| k******w 发帖数: 269 | 3 Wow, thanks,
If I want to keep those records, then use"if...then keep", right?
thanks again | D******n 发帖数: 2836 | 4 if u want to keep those records ,u just dont do anything.
btw, in case the missing value occurs first,e.g.
A .
A 1
A .
u can sort the data first
proc sort data=a1;by code desceding grade;run;
【在 k******w 的大作中提到】 : Wow, thanks, : If I want to keep those records, then use"if...then keep", right? : thanks again
|
|