Hi every one:)
I have a dataset, with variable v1 v2 and Rev, see below:
now I would like to transfer dataset into an array:
How could i accomplish that? should I use array? is there any procedure better than array?
Great Thanks,
Jenny
Not sure what you mean by an array. You could use PROC TRANSPOSE, but then the numbers that you have in V2 will be turned into variable names.
proc transpose data=have out=want ;
by v1 ;
id v2 ;
var rev ;
run;
View solution in original post
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Latest Updates
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.