Date: Tue, 7 Aug 2007 23:48:19 -0000
Reply-To: "yoonsup@gmail.com" <yoonsup@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "yoonsup@gmail.com" <yoonsup@GMAIL.COM>
Organization: http://groups.google.com
Subject: counting rows with condition
Content-Type: text/plain; charset="iso-8859-1"
Hi all,
I'm trying to get number of rows within each column with a few simple
conditions (Example dataset follows
after my question). Say I want to count number of rows in column A
with condition <0.05, <0.01 and <0.001
independently and store them as new column names as A_05, A_01, A_001
in a new dataset, say, "count". Also do the same on column B and store
them as B_05, B_01, B_001 in the "count" dataset, so the "count"
dataset
will have 6 columns. I tried proc sql but was not able to figure out
how to count them independently. Any suggestion?
Thanks.
Yoon
-----------------------------------------------------------
data test;
input A B;
cards;
0.73881725 0.564352457
0.522868443 0.45209803
0.95022985 0.953135437
0.618246892 0.573257113
0.983615318 0.199989929
0.506192327 0.825473437
0.006298226 0.800230824
0.478190999 0.104005372
0.429743949 0.257555838
0.412412675 0.328947322
;
run;
|