haozhu233 / kableExtra

Construct Complex Table with knitr::kable() + pipe.
https://haozhu233.github.io/kableExtra/
Other
688 stars 147 forks source link

Add extra_latex_after= argument to add_header_above() --- Happy to implement. #828

Open krivit opened 7 months ago

krivit commented 7 months ago

This is to parallel the eponymous argument to row_spec(). I have a preliminary implementation and would be happy to submit a PR.

To Reproduce

---
output: pdf_document
---

```{r}
library(kableExtra)
data(mtcars)
mtcars <- mtcars[1:3, 1:3]
kable(mtcars) |>
  add_header_above(c("abc"=2, "def"=2), extra_latex_after = "\\cline{3-4}", line=FALSE)

produces something like
![image](https://github.com/haozhu233/kableExtra/assets/15682462/73bc56c8-d627-4e50-bc76-d5fe38ec5427)
haozhu233 commented 6 months ago

Oh, sure, I can see the use cases of this functionality. That would be great!

krivit commented 6 months ago

Oh, sure, I can see the use cases of this functionality. That would be great!

Will try to submit in the next week or so. Is there a contribution guidelines and procedures document? Coding style, documentation style, test cases, whether to add myself to contributors in the DESCRIPTION, that sort of thing?

haozhu233 commented 6 months ago

Thanks! There is no need to rush.

For documentation, it would be great if you can add a short example to the pdf version of the doc. You can also add a test on whether your example runs in the test cases. And yeah, please add yourself as a contributor if you want to be included.