BookmarkSubscribeRSS Feed
karaheller20
Calcite | Level 5

I am looking for an impressive way to delete the missing observations in my variable ev_count. I know I could just list the options 0,1,2,3 and = them to themselves and then put other delete. But I have to submit my code with my project and cannot find a better more time efficient way to just delete the whole row when ev_Count is missing. 

3 REPLIES 3
novinosrin
Tourmaline | Level 20

Are you meaning 

if missing(ev_count) then delete;
PaigeMiller
Diamond | Level 26
data want;
   set have;
   if missing(ev_count) then delete;
run;
--
Paige Miller
PeterClemmensen
Tourmaline | Level 20

So you simply want to delete observations whare the variable ev_count is missing?

 

data have;
input ev_count;
datalines;
1
.
2
.
;

data want;
    set have;
    if not missing(ev_count);
run;