Comments (5)
Hi, just tried it out, and now it works nicely. Appreciate the quick fix :)
from kableextra.
Hi, @Jaeoc, thanks for reporting this bug. In fact, I just fixed a very similar bug last night which causes similar behavior when you have symbols like % present. Can you try to re-install from github and let me know if this bug has gone away?
from kableextra.
Hi,
it seems like I was mistaken with what the cause of the problem was. I fiddled around with the mtcars dataset to try to reproduce the issue, and it seems to have to do with the structure of the dataframe used for the table. In my original table I had some variables where I'd used paste0 to create columns with two values, one being in parentheses, like so: "3452 (3.2)". It appears that for those rows where this is the case, the group_rows function does not work. The code below reproduces this for the mtcars dataset. Not sure what the problem is exactly though, since there is no problem if I just force a column to be a factor or character value...
library(knitr)
library(kableExtra)
for (i in 1:nrow(mtcars)) {
mtcars$hp[i] <- paste0(mtcars$hp[i], " (", 1, ")")
}
kable(head(mtcars, n = 20), caption = "test", booktabs = T) %>%
kable_styling() %>%
group_rows("these rows", 4, 16) %>%
group_rows("Those rows", 17,20)
from kableextra.
I see. I just reproduced the error. I know where the problem is but the fix is a little tricky. I'll see what I can do.
from kableextra.
Hi, @Jaeoc, I just fixed the bug. Do you want to try out the latest github version and let me know the results?
from kableextra.
Related Issues (20)
- Add Borders in Align? HOT 3
- Table does not show up with content in html, only lines (sequential kable tables mystery) HOT 2
- Enable row_spec() to modify specific rows of multirow headers or provide a separate function to do so. HOT 3
- Add extra_latex_after= argument to add_header_above() --- Happy to implement. HOT 3
- KableExtra can not deal with cells start with < HOT 1
- version 1.4.0 of kableExtra, save_kable() does not export the pdf as formatted in html HOT 2
- Double "Table" in caption HOT 4
- `collapse_rows` does not work with col.names set to empty string HOT 1
- When setting hline_after = TRUE in the row_spec() function for PDF (LaTeX) output, an extra line break is inserted in the LaTeX \midrule. HOT 2
- `cell_spec(..., italic = TRUE)` gives incorrect format for PDF table HOT 4
- 当表头是中文的情况下,生成的表格内容错位 HOT 6
- Math symbols in add_header_above escaped when rjtools generates a LaTeX pdf HOT 8
- hline_after in row_spec adds unwanted extra line for latex output HOT 2
- table caption adds [H] when i use HOLD_position option in kable_styling in pdf output HOT 4
- pack_rows() creates an indentation in table produced with kable in rmarkdown
- row_spec causes "! Undefined control sequence." HOT 1
- HTML escape = FALSE broken since 1.4.0 unless format explicitly declared HOT 2
- collapse_rows () has problem with columns HOT 1
- latex_options creates second table label in distilled output HOT 3
- Problems generating a 3d Table. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kableextra.