LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 12 Oct 2006 12:08:51 -0400
Reply-To:     Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject:      Re: Count number of 1 in V1 to V15
Content-Type: text/plain; charset=ISO-8859-1

data a; set ...; array x(*) v1-v15; counter=0; do i=1 to dim(x); if x(i)=1 then counter+1; end; .... run;

one of several possibilities I think...

On Thu, 12 Oct 2006 11:04:05 -0500, Ayesha Ur-Rehman <ayeshaurrehman@HOTMAIL.COM> wrote:

>I have 15 variables V1 to V15 with values 1 or 2 and I want to counts all >the 1s, like > >COUNT Z=V1 to V15 (1). This SPSS command and I am looking to do it in SAS. > >Thanks > >Ayesha > >_________________________________________________________________ >Find a local pizza place, music store, museum and more…then map the best >route! http://local.live.com


Back to: Top of message | Previous page | Main SAS-L page