BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
aperansi
Quartz | Level 8

I have the below data set that I would to remove certain variables from. Any of the variables where an observation equals 'X"  I would like dropped. 

 

I would like to know how I can code my program to remove these observations. 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Okay, first let's make sure we are understanding each other properly. It seems to me that you want to drop the observations (not variables) where vendor = 'Clarity'. Is that correct? If so, please modify the title of your message.

 

In a data step, you need this line:

 

if vendor = 'Clarity' then delete;
--
Paige Miller

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Okay, first let's make sure we are understanding each other properly. It seems to me that you want to drop the observations (not variables) where vendor = 'Clarity'. Is that correct? If so, please modify the title of your message.

 

In a data step, you need this line:

 

if vendor = 'Clarity' then delete;
--
Paige Miller
aperansi
Quartz | Level 8
You are correct in your assumption, and my apologies for the confusion. I meant I wanted to drop the observations in which vendor equaled clarity. Thank you very much for providing me with the solution.
novinosrin
Tourmaline | Level 20

Hi @aperansi Kindly mark the solution as answered and close the thread plz. Just a request

aperansi
Quartz | Level 8
My apologies. I accepted it as a solution.
novinosrin
Tourmaline | Level 20

Thank you and no apologies required. We just need to get used to it and I have the problem 🙂  Thanks again!