Module:BiologicalAgeBiomarkers: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 13: Line 13:
function p.createCrossTable(frame)
function p.createCrossTable(frame)
     -- Start of the wiki table
     -- Start of the wiki table
     local wikitable = '{| class="wikitable sortable"\n!'
     local wikitable = '{| class="wikitable sortable"\n'


     -- Column headers: Biomarker and System
     -- Column headers: Biomarker and System
     wikitable = wikitable .. ' System !! Biomarker !! Count '
     wikitable = wikitable .. '! System !! Biomarker !! Count '
     for _, study in pairs(studies) do
     for _, study in pairs(studies) do
         wikitable = wikitable .. ' !! ' .. p.template(frame, "pmid", study.pmid)
         wikitable = wikitable .. ' !! ' .. p.template(frame, "pmid", study.pmid)
Line 24: Line 24:
     for i, row in ipairs(rows) do
     for i, row in ipairs(rows) do
         wikitable = wikitable .. '|-\n'
         wikitable = wikitable .. '|-\n'
         wikitable = wikitable .. '! ' .. row.name .. '\n'
         wikitable = wikitable .. '! rowspan="2" | ' .. row.name .. '\n'
wikitable = wikitable .. '!\n'
         for _, study in ipairs(studies) do
         for _, study in ipairs(studies) do
             local cellValue = study[row.key] or ""
             local cellValue = study[row.key] or ""