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 (November 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 10 Nov 2007 11:17:34 -0000
Reply-To:   Peter <crawfordsoftware@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Peter <crawfordsoftware@GMAIL.COM>
Organization:   http://groups.google.com
Subject:   Re: Multiple variables quesiton
Comments:   To: sas-l@uga.edu
In-Reply-To:   <200711092104.lA9I6lX6020566@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset="us-ascii"

On Nov 9, 9:04 pm, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: > Excellent suggestion. However, to catch for potentially cancelling > negative and positive numbers, I'd change the statement to: > > if abs(min(of col:)) + abs(max(of col:)) ne 0; > > Art > -------- > > > > > > On Fri, 9 Nov 2007 14:49:11 -0600, data _null_, <datan...@GMAIL.COM> wrote: > >Art, > > >Consider the following slight modification to your program. Using > >COL: allows the program to work with more than 4 observations > >(transposed to variables). > > >Would not work with lots of observations but the OP mentioned about > >100 as I recall. > > >data temp2; > > set temp1; > > if min(of col:) + max(of col:) ne 0; > > run; > > >On Nov 9, 2007 1:38 PM, Arthur Tabachneck <art...@netscape.net> wrote: > >> Mike, > > >> I don't know if this is any easier than Paige's suggestion, but it > avoids > >> having to deal with the nuances of macro variables: > > >> data have; > >> input a b c d e; > >> cards; > >> 1 0 2 0 0 > >> 0 0 0 0 0 > >> 2 0 0 1 0 > >> 3 0 0 0 0 > >> ; > > >> proc transpose data=have out=temp1; > >> run; > > >> data temp2; > >> set temp1; > >> if min(of col1-col4) + max(of col1-col4) ne 0; > >> run; > > >> proc transpose data=temp2 out=want (drop=_:); > >> run; > > >> HTH, > >> Art > >> --------- > >> On Fri, 9 Nov 2007 10:19:59 -0800, mhol...@CUESTA.EDU wrote: > > >> >Hello all, > >> > I am working with a dataset with ~200 variables and ~100 > >> >observations each. Most of the data are zeros. Is there a way to > >> >delete all of the variables that have all zero values? The If/then > >> >only seems to work for individual variables. Thanks. > > >> >Mike- Hide quoted text - > > - Show quoted text -

a simpler form might be if range( of _numeric_ );


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