| Date: | Fri, 3 Oct 2003 15:19:40 -0400 |
| Reply-To: | Jialu Zhang <jzhang8@GL.UMBC.EDU> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Jialu Zhang <jzhang8@GL.UMBC.EDU> |
| Organization: | University of Maryland, Baltimore County |
| Subject: | delete a column |
| Content-Type: | TEXT/PLAIN; charset=US-ASCII |
|---|
Hello,
Does anyone know how to do this:
data one;
input x1 x2 x3;
cards;
1 3 5
1 2 5
1 3 4
1 5 9
1 1 6
1 4 7
;
run;
What I need to do is: if all the observations in one column have the same
value, then the column will be deleted. In this case, the x1 variable need
to be deleted from the dataset since the only value of x1 variable is 1.
The dataset will look like the following after deleting x1 column.
data one:
x2 x3
3 5
2 5
3 4
5 9
1 6
4 7
Many thanks in advance.
Jialu
|