04-20-2015 12:38 PM
I created character variables as follows:
"mean(standard deviation)" from numeric variables. The character variables include spaces inside the parantheses which I didn't include. How best to clean these variables?
My code is here:
%macro restructure (var, level);
if &var. ne "&level." then delete;
if &var.="&level." then &var.&level.=round(mean, .1)||"("||(round(stddev, .1))||")";
proc print data=mean_&var.&level.;
var &var variable &var.&level.; run;
some sample output:
Thanks very much!