Hi Everyone,
In proc tabulate, I run keyword to my data (for example, mean median), but I want to delete the left column with nothing as following snip shot:
How to resolve this? Any help would be greatly appreciated.
Thanks ahead,
The code I have:
data score;
infile datalines delimiter=',';
input name $ score YEAR ;
datalines;
John,98,2018
Mary,95,2017
Tom,100,2016
Jerry,80,2016
;
proc tabulate data=score;
class YEAR/ order=data preloadfmt;
classlev YEAR;
var score;
table score=""*(n='Number of Respondents'*f=comma10. min='Minimum'*f=dollar10. q1='Lower Quartile'*f=dollar10.
mean='Average'*f=dollar10. median='Median'*f=dollar10. q3='Upper Quartile'*f=dollar10. max='Maximum'*f=dollar10. stddev='Standard Deviation'*f=dollar10.)*[style=[JUST=r vjust=c]] ,
(YEAR= "")*[style=[Cellwidth=200]]/box={s=[just=L]} style_precedence=row printmiss misstext='' ;
run;
Try
options missing="";
proc tabulate data=score;
class YEAR/ order=data preloadfmt;
classlev YEAR;
var score;
table (n='Number of Respondents'*f=comma10. min='Minimum'*f=dollar10.
q1='Lower Quartile'*f=dollar10.
mean='Average'*f=dollar10. median='Median'*f=dollar10.
q3='Upper Quartile'*f=dollar10. max='Maximum'*f=dollar10.
stddev='Standard Deviation'*f=dollar10.)*[style=[JUST=r vjust=c]] ,
score=""*(YEAR= "")*[style=[Cellwidth=200]]/box={s=[just=L]}
style_precedence=row printmiss misstext='' ;
run;
Try
options missing="";
proc tabulate data=score;
class YEAR/ order=data preloadfmt;
classlev YEAR;
var score;
table (n='Number of Respondents'*f=comma10. min='Minimum'*f=dollar10.
q1='Lower Quartile'*f=dollar10.
mean='Average'*f=dollar10. median='Median'*f=dollar10.
q3='Upper Quartile'*f=dollar10. max='Maximum'*f=dollar10.
stddev='Standard Deviation'*f=dollar10.)*[style=[JUST=r vjust=c]] ,
score=""*(YEAR= "")*[style=[Cellwidth=200]]/box={s=[just=L]}
style_precedence=row printmiss misstext='' ;
run;
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.