Date: Mon, 1 Dec 2008 21:08:34 -0500
Reply-To: Ian Whitlock <iw1sas@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <iw1sas@GMAIL.COM>
Subject: Re: Data vector problem
Content-Type: text/plain; charset=ISO-8859-1
Ryan,
data w ;
input x1 x3 x5 x7 x9 ;
seq + 1 ;
cards ;
47 153 49 28 .
. 56 106 . 35
221 201 . 155 20
;
proc transpose data = w out = t;
by seq ;
run ;
data t2 ( drop = seq ) ;
set t ;
_name_ = cats ( _name_, "_", seq ) ;
run ;
proc transpose data = t2 out = t3 ( drop = _name_ ) ;
run ;
proc print data = t3 ;
run ;
Ian Whitlock
==============
Date: Mon, 1 Dec 2008 19:14:18 -0500
Reply-To: Ryan Richmond <richmondhillsdale@YAHOO.COM>
Sender: "SAS(r) Discussion"
From: Ryan Richmond <richmondhillsdale@YAHOO.COM>
Subject: Data vector problem
I have a dataset that currently has 5 variables and 40 observations
for each. What I would like to do is make a new dataset with 200
variables and 1 observation. The 200 variables represent consecutive
days. For each new obs value I would like the line moved to the top
and placed after the last variable in _N_=1.
No luck so far. Thanks, again. Ryan
The SAS System 18:29 Monday, December 1, 2008 2
Obs x1 x3 x5 x7 x9
1 47 153 49 28 .
2 . 56 106 . 35
3 221 201 . 155 20