Dear All, I was asked this question (https://bbs.pinggu.org/forum.php?mod...=1#pid57861683). Suppose that we have a dataset like
Code:
clear
input float(id indu)
1 .9375
2  .125
3     1
4  .375
5  .625
end
The purpose is to construct a new dataset like
Code:
clear
input str4 id float(id1 id2 id3 id4 id5)
"id1" .9375 .125 .9375 .375 .625
"id2"  .125 .125  .125 .125 .125
"id3" .9375 .125     1 .375 .625
"id4"  .375 .125  .375 .375 .375
"id5"  .625 .125  .625 .375 .625
end
The value for each pair, say, id1 and id2, is the minimum of id=1 (.9375 and id=2 (.125). Any suggestions to go from the data above to the data below? Thanks.