Date: Wed, 15 Nov 2000 08:59:55 -0500
Reply-To: Paige Miller <paige.miller@KODAK.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Paige Miller <paige.miller@KODAK.COM>
Organization: Eastman Kodak Company
Subject: Re: counting "non missing" values
Content-Type: text/plain; charset=us-ascii
welterh@my-deja.com wrote:
>
> Hi!
>
> I would like to count the number of "non-missing" observations, but
> don't know how to do it. Is there an easy solution?
>
> Here my input dataset:
>
> OBS VAR1 VAR2 VAR3
> 1 5 X .
> 2 . Y .
> 3 4 . 2.6
>
> And heres the answert I would like to have:
> VAR1 2
> VAR2 2
> VAR3 1
Use the N function, which counts the number of non-missing values.
NONMISS = N (OF Var1-Var3);
Couldn't be simpler!
--
Paige Miller
Eastman Kodak Company
paige.miller@kodak.com
"It's nothing until I call it!" -- Bill Klem, NL Umpire
"Those black-eyed peas tasted all right to me" -- Dixie Chicks