Skip to content

Commit

Permalink
Update TableOne.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
markgpritchard committed Mar 28, 2024
1 parent ca6d62e commit c19a6f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TableOne.jl
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,13 @@ function _getvarname(var, varnames::Dict)
end

function _addnmissing!(_t, varvect, strataids)
n = _countmissing(varvect)
n = _countmissing(varvect, strataids)
nmissing = [ "" for _ axes(_t, 1) ]
nmissing[1] = sprint(show, n)
insertcols!(_t, :nmissing => nmissing)
end

function _countmissing(varvect, sn=:Total)
function _countmissing(varvect, strataids, sn=:Total)
idmissing = findall(ismissing, varvect)
vectorcountmissing = findall(x -> x idmissing, strataids[Symbol(sn)])
n = length(vectorcountmissing)
Expand Down

0 comments on commit c19a6f6

Please sign in to comment.