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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.