Date: Thu, 1 Dec 2005 02:45:40 -0500
Reply-To: SASsy <sas__l@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SASsy <sas__l@HOTMAIL.COM>
Subject: Re: Add row to table
Hi,
clear enough to suggest you look at the SPARSE option..
>Proc Freq;
>TABLES tvessel * proc /SPARSE OUT = m1;
>RUN;
S
On Wed, 30 Nov 2005 23:05:47 -0600, Herbert Morley A
<Morley.Herbert@HCAHEALTHCARE.COM> wrote:
>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
|