The SAS Output Delivery System and reporting techniques

Proc tabulate,want to delete left column for keyword such as mean median

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 14
Accepted Solution

Proc tabulate,want to delete left column for keyword such as mean median

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:

 Capture.PNG

How to resolve this? Any help would be greatly appreciated.

 

Thanks ahead,

 

Smiley WinkThe 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;

Accepted Solutions
Solution
‎02-26-2018 03:58 PM
Esteemed Advisor
Posts: 5,625

Re: Proc tabulate,want to delete left column for keyword such as mean median

Posted in reply to XiaoGuaiShou

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;
PG

View solution in original post


All Replies
Solution
‎02-26-2018 03:58 PM
Esteemed Advisor
Posts: 5,625

Re: Proc tabulate,want to delete left column for keyword such as mean median

Posted in reply to XiaoGuaiShou

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;
PG
Occasional Contributor
Posts: 14

Re: Proc tabulate,want to delete left column for keyword such as mean median

WOW! I want to say it is awesome~! It is exactly what I want. Thank you so much.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 199 views
  • 1 like
  • 2 in conversation