LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 29 Jun 2006 17:33:15 +0000
Reply-To:   toby dunn <tobydunn@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   toby dunn <tobydunn@HOTMAIL.COM>
Subject:   Conditional Output was ( RE: data array )
Comments:   To: hsiehchu@MSU.EDU
In-Reply-To:   <200606291719.k5TH54Bu008205@mailgw.cc.uga.edu>
Content-Type:   text/plain; format=flowed

Joanne ,

Data one ; Set XXX ;

Do I = 1 to 2 ; Output ; End ;

Run ;

Toby Dunn

From: joanne <hsiehchu@MSU.EDU> Reply-To: joanne <hsiehchu@MSU.EDU> To: SAS-L@LISTSERV.UGA.EDU Subject: data array Date: Thu, 29 Jun 2006 13:19:45 -0400

Hello: a simple question about data arrangement. but, not knowing how to begin with. will appreciate for your any advice or input.

i have a dataset look like the following,

Obs ID X1 TIME X2 X3 X4 1 02 54 0 2 -0.67 -1.04 2 02 57 1 2 -0.27 -0.61 3 02 55 2 2 -0.57 -0.18 4 15 59 0 2 -0.17 -1.04 5 15 60 1 2 -0.10 0.07 6 15 61 2 2 -0.39 -0.81 7 16 56 0 1 0.11 0.87 8 16 55 1 1 -0.44 -0.37 9 16 55 2 1 0.06 -0.44 ...... if i'd like to extend the original data, and makes each ID regenerate its corresponding variables (like, X1, Time, X2, X3...) twice in each column,

Obs ID X1 TIME X2 X3 X4 1 02 54 0 2 -0.67 -1.04 2 02 57 1 2 -0.27 -0.61 3 02 55 2 2 -0.57 -0.18 4 02 54 0 2 -0.67 -1.04 5 02 57 1 2 -0.27 -0.61 6 02 55 2 2 -0.57 -0.18 7 15 59 0 2 -0.17 -1.04 8 15 60 1 2 -0.10 0.07 9 15 61 2 2 -0.39 -0.81 10 15 59 0 2 -0.17 -1.04 11 15 60 1 2 -0.10 0.07 12 15 61 2 2 -0.39 -0.81 ...... what should i do to make it? thanks in advance for your time & help.


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