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
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Register now!
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.