May I know how to add multiple headers to the table, similar as below, with reactable package? I see below code can draw one 2 headers, but have difficulty in 3 headers as below figure show.
(1) My first line header has multiple duplicated names
(2) I have 3 headers.
reactable(
iris[1:5, ],
columns = list(
Sepal.Length = colDef(name = "Length"),
Sepal.Width = colDef(name = "Width"),
Petal.Length = colDef(name = "Length"),
Petal.Width = colDef(name = "Width")
),
columnGroups = list(
colGroup(name = "Sepal", columns = c("Sepal.Length", "Sepal.Width")),
colGroup(name = "Petal", columns = c("Petal.Length", "Petal.Width"))
)
)
Thanks!!