Date: Wed, 28 Sep 2011 14:17:59 -0400
Reply-To: "Viel, Kevin" <kviel@SJHA.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Viel, Kevin" <kviel@SJHA.ORG>
Subject: Re: Carriage Return in Labels and Data Values for ODS RTF
In-Reply-To: <201109281726.p8SFWlYm018906@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mary
> Rosenbloom
> Sent: Wednesday, September 28, 2011 1:26 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Carriage Return in Labels and Data Values for ODS RTF
>
> Hi all,
>
> I am posting this here because I'm not sure how to search for this topic
> online. I usually try to do my homework a bit before asking you all for
> your time.
>
> I have a dataset like this:
>
> measurement result
>
> measure1 100 (1.1 +/- 0.1) (98, 102)
> measure2 60 (40.5 +/- 5.1) (28, 80)
>
> The variable RESULT has the following label:
> Baseline N (Mean +/- SD) (Min, Max)
>
> I create the values for RESULT by concatenating some summary statistics
> from a PROC. I also create the label by concatenating the visit name with
> a string.
>
> I will use PROC REPORT with ODS RTF to output these results. I would like
> the results to display like this (simplified version):
>
> measurement Baseline N
> (Mean +/- SD)
> (Min, Max)
> measure1 100 (1.1 +/- 0.1)
> (98, 102)
> measure2 60 (40.5 +/- 5.1)
> (28, 80)
>
> QUESTION: Is there a way to embed some special character in the variable
> label and also in the value of each variable so that when I send the
> results to an .rtf doc with ODS that the carriage returns are used? Is
> this a case where I would use an ODS escape character? Can this even be
> done?
>
> I know that I can use split characters within PROC REPORT in each
> individual DEFINE statement, but I am trying to set up labels ahead of
> time instead.
>
> Thanks in advance for pointing me in the right direction.
Yes, ODS EscapeChar is your friend, but you want newline (\n):
ODS EscapeChar = "\" ;
So you might want:
Label Measurement = "Baseline N\n(Mean +/- SD)\n (Min, Max)" ;
You might even consider:
Label Measurement = "Baseline N\n(Mean " "B1"x "SD)\n (Min, Max)" ;
HTH,
Kevin
Kevin Viel, PhD
Senior Research Statistician
Patient Safety & Quality
International College of Robotic Surgery
Saint Joseph's Translational Research Institute
Saint Joseph's Hospital
5671 Peachtree Dunwoody Road, NE, Suite 330
Atlanta, GA 30342
(678) 843-6076: Direct Phone
(678) 843-6153: Facsimile
(404) 558-1364: Mobile
kviel@sjha.org
Confidentiality Notice:
This e-mail, including any attachments is the
property of Catholic Health East and is intended
for the sole use of the intended recipient(s).
It may contain information that is privileged and
confidential. Any unauthorized review, use,
disclosure, or distribution is prohibited. If you are
not the intended recipient, please delete this message, and
reply to the sender regarding the error in a separate email.
|