data test;
infile cards;
input A1 A2 A3 A4 A5;
cards;
-2 2 5 1 0
1 -2 5 1 2
;
run;
how to get only positive values ?
What is your desired result?
Hi Peter,
I want get only positive values only A1 to A5 variables
What does the actual resulting data set look like?
One interpretation of your request would remove entire observations from the data set if any of the variables are negative.
Another would be to set the negative values to missing.
Another could be create custom format so that negative values appear as blanks in printed output.
Another could be remove a variable from a data set if any of its values are negative.
If I were more awake I might even come up with more meanings for "only positive values"
What do you mean by get in "get only positive values"?
I don't get it.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.