Hi, How do I format my values to get the # of decimal places I want? data: col1 col2 Mean (SD) 168.4932 (9.9923) Median 167.5122 IQR 160.523, 178.833 Min, Max 151.623, 185.423 want: Mean (SD) 168.49 (9.992) Median 167.51 IQR 160.52, 178.83 Min, Max 151.6, 185.4 if nmiss(mean,sd)=0 then do;
ord=2;
val=strip(put(mean,4.1))||' ('||strip(put(sd,5.2))||')';
output;
end;
if median ne . then do;
ord=3;
val=strip(put(median,4.1));
output;
end;
if n(q1,q3)=2 then do;
ord=4;
val=strip(put(q1,4.1))||', '||strip(put(q3,4.1)) ;
output;
end;
if n(min,max)=2 then do;
ord=5;
val=strip(put(min,4.1))||', '||strip(put(max,4.1)) ;
output;
end;
run;
... View more