how to add distinctly var variable values ex..
Data a;
input var;
datalines;
0
1
2
3
-1
-2
-3
;
run;
adding all +ve value in one varibale n do the same for -ve
too
Answer Posted / arun kumar
proc sql;
create table arun as
select sum(case when var>=0 then var else . end) as num_p,
sum(case when var<0 then var else . end) as num_n
from a;
quit;
proc print;
run;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What does proc print, and proc contents are used for?
Explain input and put function?
Explain the purpose of retain statement.
What sas features do you use to check errors and data validation?
What do you understand by the term Normal Distribution?
If a variable contains only numbers, can it be a character data type?
What is factor analysis?
What is PROC in SAS?
What is the purpose of trailing @ and @@? How do you use them?
what is change analysis in sas di ? : Sas-di
Describe the function and untility of the most difficult SAS macro that you have written.
Give some examples where proc report’s defaults are different than proc print’s defaults?
do you prefer proc report or proc tabulate? Why? : Sas programming
What is your favorite all time computer book? Why?
hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?