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;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.