*! 26oct2011 * @@ Written by Elliott Lowy, mostly on the US government's dime (17 US Code ยง 105). program pair, version 11 mata: DoIt() end version 11 mata: void DoIt() { //>>def func<< syntaxl(st_local("0"),(&(two="!anything"),&(ifin="ifin")),(&(keep="k:eep"))) two=varlist(two,"min(2) max(2)") if (sum(strvars(two))!=1) errel("Exactly one of the variables must be string") settouse(touse,ifin) nix=toindices(!strvars(two)) both=uniqrows(el_sdata(.,two,touse)) if (rows(uniqrows(both[,nix]))