A is:
course1 course 2 course3 course4
school1: 3 2 4 1
school2: 2 1 0 3
school3: 4 6 3 2
B is
school1 course1 3
school1 course2 2
school1 course2 4
school1 course2 1
school2 course2 2
school2 course2 1
school2 course2 0
school2 course2 3
school3 course2 4
school3 course2 6
school3 course2 3
school3 course2 2
Okay in that case you can explicitly type those names or use var1--varN (double dash variable list)
data a;
input school $ course1 course2 course3 course4 ;
cards;
school1 3 2 4 1
school2 2 1 0 3
school3 4 6 3 2
;
proc transpose data=a out=b;
by school;
var course1-course4;
run;
Okay in that case you can explicitly type those names or use var1--varN (double dash variable list)
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: