Shiny: Merge cells in DT::datatable

后端 未结 2 557
名媛妹妹
名媛妹妹 2020-12-17 21:14

I would like to merge few rows in column in DT::datatable in shiny. Is it possible to do so?

Currently I am able to output which looks something like this:

<

2条回答
  •  无人及你
    2020-12-17 21:39

    hey as far as i know its not possible to do it in DT i have another way to make it happen.

     kable(c, align = "c") %>%
      kable_styling(bootstrap_options = "striped", full_width = F, position = "left",font_size = 12)%>%
      column_spec(1, bold = T) %>%
      collapse_rows(columns = 1, valign = "middle")
    

    please try it and it works :)

提交回复
热议问题