Hi Reeza, Thank you for your reply. It is basically giving me the data that I wanted. There is only one problem. When the dataset is created based on the test data set below, it will create 80 different rows of mean values. If I still do 6 choose 3, that means 20 different combinations for each of the rows of data. Since i have 4 rows then the total is 80. So, the dataset created has the right data. data testData;
infile datalines delimiter=',';
INPUT A B C D E F;
DATALINES;
12,78,54,75,85,89
45,56,32,425,45,45
74,45,65,78,56,12
12,12,45,78,12,45
; When I try to transpose, I only want to have 20 different mean values as columns. That means i have to transpose by "comb" column or group the values somehow. But "comb" has values 'ABC' or 'BCA' or 'CAB' or 'ACB'. So, instead of getting 20 columns, i am getting 80. Is there a way to either sort the value of "comb" when it is getting created. Something like this: comb = sort(catt(of nms1-nms3)); That way all combinations of A B C are "ABC" and not something else. Then i belive i can do the transpose by "comb". Hopefully i didnt confuse you. Thanks again for the help.
... View more