Help with Transposing my Dataset

Reply
N/A
Posts: 0

Help with Transposing my Dataset

Hi,

I have a dataset as below

ID VI HGT WGT
10 1 40 100
10 2 41 104
11 2 32 202

I would like to transpose this as hgt and wgt to the left and headers
be unique ID,VI. Basically something like this below should rescue me.
I'm not sure if this is possible.

10-1 10-2 11-2
HGT 40 41 32
WGT 100 104 202


I used basic transposing so far and couldn't find an example for
something like this any where else.

Appreciate your Help...

Regards,
Eddie
Esteemed Advisor
Posts: 5,095

Re: Help with Transposing my Dataset

To me, it looks more like a report rather something you would like to store i a table.
Maybe you could try PROC TABULATE, it'll let you be quite free on where to put your data in a matrix.

/Linus
Data never sleeps
Contributor
Posts: 74

Re: Help with Transposing my Dataset

1. create new variable idvi to concatenate ID and VI, ie a variable with values like 10-1, 11-2
2.proc transpose / var hgt wgt /id idvi
Post a Question
Discussion Stats
  • 2 replies
  • 278 views
  • 0 likes
  • 3 in conversation