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)
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
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.
Ready to level-up your skills? Choose your own adventure.