Date: Fri, 15 Oct 2004 07:30:21 -0700
Reply-To: shanky <shankardasm@BLUEBOTTLE.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: shanky <shankardasm@BLUEBOTTLE.COM>
Organization: http://groups.google.com
Subject: Re: rows
Content-Type: text/plain; charset=ISO-8859-1
Hi Avikram Nuriel:
You could use proc transpose for observations as variables and vice versa.
the program for your example would look like this:
data one;
proc sort data=one;
by id;
run;
proc transpose data=one out=two;
by id
id id;
var x;
proc print data=two;
run;
Hope it helps to solve your problem;
Shanky
Avikam Nuriel <mshope@cc.huji.ac.il> wrote in message news:<Pine.GSO.4.60.0410140909280.10544@nn-shum>...
> Hi,
>
> this is my data:
>
> id x
> 1 101
> 1 141
> 1 16
> 1 143
> 2 101
> 3 701
> 3 543
> .
> .
> .
>
> I want to change it to:
>
> id x1 x2 x3 x4
> 1 101 141 16 143
> 2 101
> 3 701 543
>
>
> and so on.
>
> regards
> Avikam Nuriel
> The Hebrew University
> of Jerusalem
> Israel