1

在下面的示例中,

  # keep the continuous var and the two categorical variables
  select(trt, age, grade) %>%
  group_nest(grade) %>%
  mutate(
    tbl = map2(
      grade, data, 
      ~tbl_summary(.y, by = trt, 
                   label = list(age = paste("Age: Grade", .x)), missing = "no")
    )
  ) %>% 
  pull(tbl) %>% 
  tbl_stack() %>%
  as_tibble()

每个年龄的观察次数:年级应该在哪里添加?

4

1 回答 1

2

添加选项

statistic = all_continuous() ~ c("{N_nonmiss}")

解决了我的问题。谢谢

于 2020-11-20T12:21:59.197 回答