Date: Mon, 17 Nov 2008 02:39:11 -0800
Reply-To: karma <dorjetarap@GOOGLEMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: karma <dorjetarap@GOOGLEMAIL.COM>
Organization: http://groups.google.com
Subject: Re: count of non-missing values in a row
Content-Type: text/plain; charset=ISO-8859-1
On 17 Nov, 10:22, shashi <shashi2...@gmail.com> wrote:
> Hi,
> My data looks like below.
>
> id a b c
> 1 2 . 2
> 2 1 10 .
> 3 . . 3
> 4 . 3 25
>
> I want another column which has the count of non-missing values of a,
> b and C. i.e.
> I want the data like:
>
> id a b c cnt
> 1 2 . 2 2
> 2 1 10 . 2
> 3 . . 3 1
> 4 . 3 25 2
>
> Could anybody suggest regarding this?
Hi Sashi,
You can use the n function to get the number of non missing values
HTH
|