I am working with LSAF at my company. When do proc tabulate in LSAF, We get results in the Results window, and I'm looking for a way to widen the width of the border table.
If the output is html / rtf / pdf, there is a way for it that it can be controlled by "cellwidth", but in the case of Results window, it was unknown, so let me ask you a question.
information source of control width when pdf / html:
https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/ba259.html
https://communities.sas.com/t5/SAS-Procedures/specifying-column-width-for-proc-tabulate/td-p/101882
/*
https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/ba185.html
*/
PROC FORMAT;
VALUE $genderf
'1' = '男'
'2' = '女'
;
VALUE ynf
1 = 'はい'
2 = 'いいえ'
;
RUN;
DATA sample;
INPUT group $ gender $ a1 @@;
FORMAT gender genderf. a1 ynf.;
CARDS;
A 1 2 A 1 1
A 1 1 A 1 1
A 2 2 A 2 1
B 1 1 B 2 2
B 2 1 B 1 2
;
RUN;
PROC TABULATE DATA=sample;
CLASS group gender a1;
TABLES (group*(gender ALL)) ALL,a1*PCTN
/ MISSTEXT='0' PRINTMISS;
;
RUN;
Output of above code in SAS Studio
Please tell me if there's a way for control column width (widening).Thank you for reading.
@t_ar_taat wrote:
I am working with LSAF at my company. When do proc tabulate in LSAF, We get results in the Results window, and I'm looking for a way to widen the width of the border table.
If the output is html / rtf / pdf, there is a way for it that it can be controlled by "cellwidth", but in the case of Results window, it was unknown, so let me ask you a question.
information source of control width when pdf / html:
https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/ba259.html
https://communities.sas.com/t5/SAS-Procedures/specifying-column-width-for-proc-tabulate/td-p/101882/* https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/ba185.html */ PROC FORMAT; VALUE $genderf '1' = '男' '2' = '女' ; VALUE ynf 1 = 'はい' 2 = 'いいえ' ; RUN; DATA sample; INPUT group $ gender $ a1 @@; FORMAT gender genderf. a1 ynf.; CARDS; A 1 2 A 1 1 A 1 1 A 1 1 A 2 2 A 2 1 B 1 1 B 2 2 B 2 1 B 1 2 ; RUN; PROC TABULATE DATA=sample; CLASS group gender a1; TABLES (group*(gender ALL)) ALL,a1*PCTN / MISSTEXT='0' PRINTMISS; ; RUN;
Output of above code in SAS Studio
Please tell me if there's a way for control column width (widening).Thank you for reading.
You say you are trying to " widen the width of the border table." I don't know what that means as there is no "border" or "border table".
You can control cell width of column and row heading cells. See if this gives you a start:
PROC TABULATE DATA=sample; CLASS group gender a1; classlev a1 group/style=[cellwidth=5cm]; TABLES (group*(gender ALL)) ALL, a1*PCTN / MISSTEXT='0' PRINTMISS; ; RUN;
CLASSLEV sets properties for CLASS variables. In this case I make two of the class variables appear in wider cells.
If this doesn't work in LSAF then contact SAS Technical support.
@t_ar_taat wrote:
I am working with LSAF at my company. When do proc tabulate in LSAF, We get results in the Results window, and I'm looking for a way to widen the width of the border table.
If the output is html / rtf / pdf, there is a way for it that it can be controlled by "cellwidth", but in the case of Results window, it was unknown, so let me ask you a question.
information source of control width when pdf / html:
https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/ba259.html
https://communities.sas.com/t5/SAS-Procedures/specifying-column-width-for-proc-tabulate/td-p/101882/* https://www.sas.com/offices/asiapacific/japan/service/technical/faq/list/body/ba185.html */ PROC FORMAT; VALUE $genderf '1' = '男' '2' = '女' ; VALUE ynf 1 = 'はい' 2 = 'いいえ' ; RUN; DATA sample; INPUT group $ gender $ a1 @@; FORMAT gender genderf. a1 ynf.; CARDS; A 1 2 A 1 1 A 1 1 A 1 1 A 2 2 A 2 1 B 1 1 B 2 2 B 2 1 B 1 2 ; RUN; PROC TABULATE DATA=sample; CLASS group gender a1; TABLES (group*(gender ALL)) ALL,a1*PCTN / MISSTEXT='0' PRINTMISS; ; RUN;
Output of above code in SAS Studio
Please tell me if there's a way for control column width (widening).Thank you for reading.
You say you are trying to " widen the width of the border table." I don't know what that means as there is no "border" or "border table".
You can control cell width of column and row heading cells. See if this gives you a start:
PROC TABULATE DATA=sample; CLASS group gender a1; classlev a1 group/style=[cellwidth=5cm]; TABLES (group*(gender ALL)) ALL, a1*PCTN / MISSTEXT='0' PRINTMISS; ; RUN;
CLASSLEV sets properties for CLASS variables. In this case I make two of the class variables appear in wider cells.
If this doesn't work in LSAF then contact SAS Technical support.
ballardw, thank you for your comment.
It works in SAS Studio.
I think this will also nice in LSAF.
I add the picture of Results window after your code.
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.