Template:CountryTable

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 17: Line 17:
 
   local hash = {};
 
   local hash = {};
 
   local list = {};
 
   local list = {};
   for inst, c in pairs(count) do
+
   for inst, num in pairs(count) do
     table.insert(list, c);
+
     table.insert(list, num);
     if (hash[c] == nil) then  
+
     if (hash[num] == nil) then  
       hash[c] = inst;
+
       hash[num] = inst;
 +
      count[num] = 1;
 
     else
 
     else
       hash[c] = hash[c] .. ". " .. inst;
+
       hash[num] = hash[num] .. "; " .. inst;
 +
      count[num] = count[num] + 1;
 
     end
 
     end
 
   end
 
   end
Line 33: Line 35:
 
     if (num == nil) then break; end
 
     if (num == nil) then break; end
 
     inst = hash[num];
 
     inst = hash[num];
     i = i + 1;
+
     i = i + count[num];
     output = output .. inst .. " (" .. num .." authors);";
+
     output = output .. inst .. " (" .. num .." authors)&&";
 
   end
 
   end
 
   print(output);
 
   print(output);

Revision as of 10:30, 15 September 2008

Top 5 institutes in this country
Author Affiliation Country
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox