Date: Tue, 1 Feb 2000 11:06:11 -0500
Reply-To: laurie_abell@DOFASCO.CA
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Laurie Abell <laurie_abell@DOFASCO.CA>
Subject: Re: delete many variables
Content-Type: text/plain
take a look at this sample program that will drop variables with all MISSING
values from a dataset.
http://ftp.sas.com/techsup/download/observations/3q96/hahl/dropvar.sas
you can easily modify it to be used for your situation
Laurie
> -----Original Message-----
> From: Hui Huang [SMTP:huihuang@IUPUI.EDU]
> Sent: Tuesday, February 01, 2000 10:22 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: delete many variables
>
> Hi all,
>
> Is there any way to delete many variables from a dataset?
> For exampl dataset AAA looks like this:
>
> c1 c2 c2 c4
> 1 0 1 0
> 0 0 1 0
> 1 0 1 0
>
> I want to delete variable c2 and c4 because every obs' value is 0
> for those variables. My point is how to delete some variables with all
> values of obs in those variables 0's, but you don't know exactly which
> variables have this property in advance, and therefore need to use some
> sentences to do the judgement work?
>
> Any responses will be appreciated.
>
> Hui
|