BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
charlottebender
Calcite | Level 5

Hi,

 

I am trying to output some tables/charts to an RTF file using SAS University and everything transfers, minus the graphics and the table. However, when I use the same code (but change the output type) for pdfs and excel files, the output works perfectly. I'm on a Mac, not sure if that's the problem. 

 

The only thing I've noticed is that the RTF file opens up as in text edit, instead of Microsoft Word, so I don't know if that is the problem? If there are any mac users with experience, some guidance would be great!

 

My code for part of what I'm trying to output is:

 

libname pm410 '/folders/myfolders';
proc contents data=pm410.analysis_bb; 
run; 
ods trace on;
ods rtf style=snow file='/folders/myfolders/Parametric & Non-Parametric Hypothesis Testing.rtf';
title1 'Simple Statistics for Age';
proc means data=pm410.analysis_bb n mean std min max;
var RIDAGEYR;
run;
title1 'Quantiles and Extreme Observations for Ages in Sample';
proc univariate data=pm410.analysis_bb;
var RIDAGEYR;
ods select quantiles extremeobs;
run;

title1 'Boxplots of Scores of EPA and DHS Consumed by Depressed and Non-Depressed Individuals';
proc npar1way data=pm410.analysis_bb wilcoxon;
class depbinary;
var EPA DHA;
ods graphics on;
ods select WilcoxonBoxPlot;
run;
ods rtf close;

 

Thanks again!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Open the RTF in Word, not a different text editor. The graphs are there but they won't show up in a text editor because editors don't show graphics. Word Processing applications such as Word, Pages will show the graphs.

 


@charlottebender wrote:

Hi,

 

I am trying to output some tables/charts to an RTF file using SAS University and everything transfers, minus the graphics and the table. However, when I use the same code (but change the output type) for pdfs and excel files, the output works perfectly. I'm on a Mac, not sure if that's the problem. 

 

The only thing I've noticed is that the RTF file opens up as in text edit, instead of Microsoft Word, so I don't know if that is the problem? If there are any mac users with experience, some guidance would be great!

 

My code for part of what I'm trying to output is:

 

libname pm410 '/folders/myfolders';
proc contents data=pm410.analysis_bb; 
run; 
ods trace on;
ods rtf style=snow file='/folders/myfolders/Parametric & Non-Parametric Hypothesis Testing.rtf';
title1 'Simple Statistics for Age';
proc means data=pm410.analysis_bb n mean std min max;
var RIDAGEYR;
run;
title1 'Quantiles and Extreme Observations for Ages in Sample';
proc univariate data=pm410.analysis_bb;
var RIDAGEYR;
ods select quantiles extremeobs;
run;

title1 'Boxplots of Scores of EPA and DHS Consumed by Depressed and Non-Depressed Individuals';
proc npar1way data=pm410.analysis_bb wilcoxon;
class depbinary;
var EPA DHA;
ods graphics on;
ods select WilcoxonBoxPlot;
run;
ods rtf close;

 

Thanks again!


 

View solution in original post

1 REPLY 1
Reeza
Super User

Open the RTF in Word, not a different text editor. The graphs are there but they won't show up in a text editor because editors don't show graphics. Word Processing applications such as Word, Pages will show the graphs.

 


@charlottebender wrote:

Hi,

 

I am trying to output some tables/charts to an RTF file using SAS University and everything transfers, minus the graphics and the table. However, when I use the same code (but change the output type) for pdfs and excel files, the output works perfectly. I'm on a Mac, not sure if that's the problem. 

 

The only thing I've noticed is that the RTF file opens up as in text edit, instead of Microsoft Word, so I don't know if that is the problem? If there are any mac users with experience, some guidance would be great!

 

My code for part of what I'm trying to output is:

 

libname pm410 '/folders/myfolders';
proc contents data=pm410.analysis_bb; 
run; 
ods trace on;
ods rtf style=snow file='/folders/myfolders/Parametric & Non-Parametric Hypothesis Testing.rtf';
title1 'Simple Statistics for Age';
proc means data=pm410.analysis_bb n mean std min max;
var RIDAGEYR;
run;
title1 'Quantiles and Extreme Observations for Ages in Sample';
proc univariate data=pm410.analysis_bb;
var RIDAGEYR;
ods select quantiles extremeobs;
run;

title1 'Boxplots of Scores of EPA and DHS Consumed by Depressed and Non-Depressed Individuals';
proc npar1way data=pm410.analysis_bb wilcoxon;
class depbinary;
var EPA DHA;
ods graphics on;
ods select WilcoxonBoxPlot;
run;
ods rtf close;

 

Thanks again!


 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1764 views
  • 1 like
  • 2 in conversation