BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
2 REPLIES 2
LinusH
Tourmaline | Level 20
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
abdullala
Calcite | Level 5
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 2 replies
  • 1156 views
  • 0 likes
  • 3 in conversation