Template:CountryTable

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
Line 6: Line 6:
 
   local auCount = {};
 
   local auCount = {};
 
   local au, inst;
 
   local au, inst;
 +
  local it = 0;
 
   for au, inst, cy in stdin:gmatch("&?&?([%w\. ]+)&&([%w\., ]+)&&([^\n]+)") do
 
   for au, inst, cy in stdin:gmatch("&?&?([%w\. ]+)&&([%w\., ]+)&&([^\n]+)") do
 
     if (inst ~= nil) then
 
     if (inst ~= nil) then
Line 13: Line 14:
 
         auCount[inst] = auCount[inst] + 1;
 
         auCount[inst] = auCount[inst] + 1;
 
       end
 
       end
       print(table.getn(auCount));
+
       it = it + 1;
 
     end
 
     end
 
   end
 
   end
Line 20: Line 21:
 
   for inst, num in pairs(auCount) do
 
   for inst, num in pairs(auCount) do
 
     table.insert(list, num);
 
     table.insert(list, num);
     print(inst .. ":" .. num .."\n");
+
     it = it - 1;
 +
    ---print(inst .. ":" .. num .."\n");
 
     if (hash[num] == nil) then  
 
     if (hash[num] == nil) then  
 
       hash[num] = inst;
 
       hash[num] = inst;
Line 29: Line 31:
 
     end
 
     end
 
   end
 
   end
 +
  print(it);
 
   table.sort(list);
 
   table.sort(list);
 
   local i=0;
 
   local i=0;

Revision as of 14:55, 15 September 2008

Top 5 institutes in this country

0


Author Affiliation Country
Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox