Dear All, I find this question here (https://bbs.pinggu.org/thread-7317333-1-1.html). Suppose that the data is
Code:
clear
input str6(var1 var2 var3 var4 var5)
"A01B1"  "A01C05" "A01C11" "A01M21" "E02F3"
"A01H11" "B25D1" "E23P15" "" ""
end
and the purpose is to obtain pairwise combination as (the desired results)
Code:
clear
input str6 (var1 var2 var3 var4 var5) str200 combine
"A01B1"  "A01C05" "A01C11" "A01M21" "E02F3" "A01B1.A01C5;A01B1.A01C11;A01B1.A01M21; A01B1.E02F3;A01C05.A01C11;A01C05.A01M21;A01C05.E02F3;A01C11.A01M21;A01C05.E02F3;A01C11.A01M21;A01C11.E02F3;A01M21.E02F3"
"A01H11" "B25D1" "E23P15" "" "" "A01H11.B25D1;A01H11.E23P15;B25D1.E23P15"
end
Any suggestions are highly appreciated.