harrelfe/Hmisc

Wrong html (summaryM) object when 2 or more grouping variables

pavilaalo opened this issue · 0 comments

Prof Harrell,

I am getting the wrong output when using summaryM for 2 grouping variables. Please find attached the code

library(Hmisc)
getHdata(pbc)
s2 <- summaryM(bili + albumin + stage + protime  + age + spiders + alk.phos + sgot + chol ~ drug + sex, 
          data=pbc,  overall=FALSE, test=TRUE)

Print s2, returns 2 tables

Correct number size for both groups in the first row, the output in the console is presented in two tables: first for males, second for females with the correct number of patients in each group and column

print(s2, digits = 3)

html s2, returns 1 table

html (s2, digits=3)

N size presented in the 3 groups (N=139, N=137 and N=98) corresponds only to females, we do not get how many males are in each drug group, while on top of the table N=44 corresponds only to males.

Thanks