Template:CountryTable
From Metabolomics.JP
(Difference between revisions)
Line 17: | Line 17: | ||
local hash = {}; | local hash = {}; | ||
local list = {}; | local list = {}; | ||
− | for inst, | + | for inst, num in pairs(count) do |
− | table.insert(list, | + | table.insert(list, num); |
− | if (hash[ | + | if (hash[num] == nil) then |
− | hash[ | + | hash[num] = inst; |
+ | count[num] = 1; | ||
else | else | ||
− | hash[ | + | 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 + | + | 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 |
---|