knowledge-database (beta)

Current group: comp.soft-sys.sas

Re: how to create a new dataset deduct from a old data set

Re: how to create a new dataset deduct from a old data set  
Arthur Tabachneck
From:Arthur Tabachneck
Subject:Re: how to create a new dataset deduct from a old data set
Date:22 Jan 05 14:23:41 GMT
Couldn't you accomplish what you want with a straight forward if statement
within a data step? E.g.,

data two;
set one;
if not ( (id eq 1 and dx eq 'a') or
(id eq 4 and dx eq 'a') or
(id eq 6 and dx eq 'b') );
run;

Art
--------
On Sat, 22 Jan 2005 09:03:29 +0800, Kingfisher
wrote:

>I have a question of how to create a new dataset deduct from a old data set
>If I have a original dataset :
>id dx case
>1 a 4
>2 b 5
>3 c 6
>4 a 1
>5 c 3
>6 b 3
>
>Now, I want to delete part of the data which contain the feature :
>id dx
>1 a
>4 a
>6 b
>
>How can I do that ? I am expecting a new dataset which looks like:
>id dx case
>2 b 5
>3 c 6
>5 c 3
>
>Please remember this is just a sample. I am actually managing a huge
>dataset. Do tell me just delete those id=1 ro 4 or 6.
>Thanks for any help.
   

Copyright © 2006 knowledge-database   -   All rights reserved