1 / 14

Getting Superscripts into your SAS output Martha Cox Population Health Research Unit Community Health & Epidemiology

Getting Superscripts into your SAS output Martha Cox Population Health Research Unit Community Health & Epidemiology Dalhousie University. Two Methods. For PUT statements, labels, and formatted values, use hex values For ODS output, use in-line formatting with the ESCAPECHAR= option.

remington
Download Presentation

Getting Superscripts into your SAS output Martha Cox Population Health Research Unit Community Health & Epidemiology

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Getting Superscripts into your SAS outputMartha CoxPopulation Health Research UnitCommunity Health & EpidemiologyDalhousie University

  2. Two Methods • For PUT statements, labels, and formatted values, use hex values • For ODS output, use in-line formatting with the ESCAPECHAR= option

  3. Obs line count pct 1 LINE01 . . 2 LINE02 237228 . 3 LINE03 7425 . 4 LINE04 . . 5 LINE05 2706 36.4444 6 LINE06 390 5.2525 7 LINE07 94 1.2660 8 LINE08 4406 . 9 LINE09 . . 10 LINE10 3 0.0681 11 LINE11 23 0.5220 The input data set: REPORT

  4. Using Hex Values in PUT Statements data _null_; file print; put 'This is a superscript zero''b0'x; put 'This is a superscript one''b9'x; put 'This is a superscript two''b2'x; put 'This is a superscript three''b3'x; run; - - - - - - - - - - - - - - - - - - - - - - - - - - This is a superscript zero° This is a superscript one¹ This is a superscript two² This is a superscript three³

  5. Using Hex Values in Labels proc print data=sashelp.class label; label age=age'b2'x; run; - - - - - - - - - - - - - - - - - - - - - - - - - - Obs Name Sex age² Height Weight 1 Alfred M 14 69.0 112.5 2 Alice F 13 56.5 84.0 3 Barbara F 13 65.3 98.0 4 Carol F 14 62.8 102.5 5 Henry M 14 63.5 102.5

  6. Using Hex Values in Format Values proc format; value $line 'LINE01' = 'Inclusion Criteria' 'LINE02' = 'Men and women 18-24 years of age on 01-APR-02 and eligible for Nova Scotia Medicare' 'LINE03' = "who were first diagnosed with rhythmopathy during the period 01-APR-02 to 31-MAR-03" 'b9'x 'LINE04' = 'Exclusion Criteria' 'LINE05' = 'Those with a previous diagnosis of Boogie Fever in the 5 years prior to index diagnosis' 'LINE06' = 'Those with a previous diagnosis of Boogie Woogie Flu in the 5 years prior to index diagnosis' 'LINE07' = 'Those with a previous diagnosis of Rockin Pneumonia in the 2 years prior to index diagnosis' 'LINE08' = 'Final Cohort' 'LINE09' = 'Outcomes' 'LINE10' = 'Clapping on the up-beat' 'LINE11' = "Chronic stepping on dance partner's feet" ; run;

  7. ODS In-line Formatting • Introduced as experimental for RTF and HTML in v8.2. Will be production for all destinations in v9.2. • Not found in on-line documentation. • Info found on SAS Support web site: • http://support.sas.com/rnd/base/topics/expv8/inline82.html • http://support.sas.com/rnd/base/topics/templateFAQ/Template_rtf.html#escapechar

  8. ODS In-line Formatting ods rtf file="temp"; ods escapechar='^'; proc print data=sashelp.class; title1 "This value is superscripted ^{super 2}"; title2 "This value is subscripted ^{sub 2}"; run; - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  9. ODS In-line Formatting ods rtf file="Rhythmopathy.rtf"; ods escapechar='^'; title1 j=l "Serious Complications of Rhythmopathy in Nova Scotia"; footnote1 "^S={font_face=Times font_size=9 pt}^{super 1} The first diagnosis of rhythmopathy received during the period 01-APR-02 to 31-MAR-03 is referred to throughout this document as the index colonoscopy."; footnote2 "^S={font_face=Times font_size=9 pt}^{super 2} For exclusion criteria, N and % represent the number and percentage of patients in the initial cohort who satisfied that criterium."; footnote3 "^S={font_face=Times font_size=9 pt} For outcomes, N and % represent the number and percentage of patients in the final cohort who satisfied the definition of that outcome.";

  10. ODS In-line Formatting proc report data=prtlines2 headline nocenter; column line count pct ; define line / order order=data flow left width=44 format=$line. ' ' ; define count / display right width=8 format=comma8. "N^{super 2}" ; define pct / display right width=8 format=pct. "(%)^{super 2}" ; break after line / skip; run; ods rtf close;

  11. The End

More Related