Date: Wed, 30 Nov 2005 23:05:47 -0600
Reply-To: Herbert Morley A <Morley.Herbert@HCAHEALTHCARE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Herbert Morley A <Morley.Herbert@HCAHEALTHCARE.COM>
Subject: Add row to table
Content-Type: text/plain; charset="iso-8859-1"
I have used Proc Freq to create an output table. One of the cells in the table has a count of 0 and is missing in the output data set.
Proc Freq;
TABLES tvessel * proc / OUT = m1;
RUN;
The table m1 looks like this: (simulated)
tvessel proc count %
No CABG 1098 92.0
No CATH 855 70.0
Yes CATH 28 8.0
I need it to have a fourth row eg:
Yes CABG 0 0
I am adding together several tables and then using the results.
Adding a new row is not the issue. I am drawing a blank on how to detect which row is missing so I can add the extra row. I want to define its count as 0.
The missing row is not always the same. It will be the yes field but may be CABG or CATH.
Sorry if this is 'clear as mud'.
Thanks for any suggestions
Morley Herbert