Hi Everyone,
I have a column out which contain only value 1, 0,-1 based on IF THEN ELSE statement.
Then, I use proc expand to calculate moving sum and the output has -0 (in scientific format).
I can kill the -0 with INT() but my program has hundred of column like that. Thus it is better that I solve the issue inside the proc expand.
Can you please help?
Thanks,
HHC
Change the conversion method to something other than the default (SPLINE). Try METHOD=STEP, for example.
First, you could change the format of all of these variables such that –0 will appear as zero. Although I am surprised that a sum of integers would give a –0, and I am thinking perhaps you haven't really described everything going on.
If that's not it, you could write an ARRAY to perform whatever task you want on all variables.
Change the conversion method to something other than the default (SPLINE). Try METHOD=STEP, for example.
Thanks a lot!
It works.
HHC
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.