I am making a table with reactable in R markdown and I want a column group with a line break. Minimal example is here:
---
output: pdf_document
---
```{r, echo=F}
library(reactable)
data = mtcars[1:4, 1:4]
reactable(
data,
columnGroups = list(colGroup(name = "This is Line 1 of the group name \\ This is Line 2 of the group name", columns=names(data)))
)
Note that the \\
just gets printed in the final output. I've tried other HTML-y things like <br />
and \n
and they get printed in the final output too.
Any thoughts?
Thanks!