I am using tbl_summary() to summarize clinical characteristics of a patient cohort.
I have a patient group and a control group. My problem is that I have more variables for the patient group (blood counts etc.) that are not available for the control group.
Example data:
library(gtsummary)
group <- rep(c("Kontrol","Patient"),times=c(5,10))
age <- floor(runif(15, min=20, max=101))
sex <- rep(c("male","female","male","female"), times=c(3,2,7,3))
Hemoglobin <- as.numeric(c(rep("",times=5),7.21,7.52,10.41,10.03,8.95,6.24,8.54,14.22,8.76,7.57))
df <- data.frame(group,age,sex,Hemoglobin)
df %>% tbl_summary(by=group)
so my question is can I make a table where these variables will have an empty value in the control column? something like: enter image description here
Thanks for your help!
