kableExtra is an R package that helps to build common complex tables (in both HTML and pdf) and manipulate table styles. Using the pipe %>% symbol one can add "layers" to a kable output to get a well-formatted table.
Questions tagged [kableextra]
680 questions
0
votes
1 answer
how to reverse only one bar in one cell if the value is negative with KableExtra/Formattable/dplyr
I have a table and I would like to do an excel bargraph-like (What I want to do)
I have a problem with negative values that don't reverse the graph (what I have now).
As you can see I have the value -5 that is not reverse and is not…

Nicolas
- 5
- 4
0
votes
2 answers
r color disappear in printing
I made a markdown in html, using kable on a dataframe. I set a background color, it works on the browser, but when i want to print paper, the color disappear... I would like to do a layout too (page break, jump line), i searched, i saw some code, i…

Aurélien
- 103
- 3
- 12
0
votes
2 answers
kableExtra with Formattable formatting questions
The code below creates a small table.
It is unclear to me how to make these changes:
1) Less white space between the two bars. Using Inspect Element I can change the padding from 8px to 3px in .table>tfoot>tr>td. Is that the right approach? If so,…

ixodid
- 2,180
- 1
- 19
- 46
0
votes
1 answer
Prevent text wrapping after kable table with kableExtra(position='float_left')
I'm trying to put multiple tables on a single line in a R Markdown document. I'm able to do that by kable %>% kableStyling(... ,position='float_left') and the tables line up nicely across a page:
However, when resuming text after these tables…

Dr Dave
- 453
- 1
- 4
- 11
0
votes
0 answers
How to knit to landscape() using kableExtra?
I have an incosistent behavior when clicking the knit button versus launching rmarkdown::render.
I have a parameterized .Rmd called test.Rmd:
---
title: '`r params$college` report'
params:
college: 'Art & Business'
output: pdf_document
---
```{r…

Dambo
- 3,318
- 5
- 30
- 79
0
votes
1 answer
R kable_styling disappears to print in html
I have a markdown file, with table where i want put one row on two in shadow, so i use :
kable(DF,"html", caption="graph")%>%
kable_styling(bootstrap_options=c("striped","hover"))
on the explorer it's working, but when i want to print it, there…

Aurélien
- 103
- 3
- 12
0
votes
1 answer
Import csv in a shiny app and the generate and download pdf document with a table using kableExtra
Hi i have a simple shiny app which consists of ui.r,server.r and kable.rmd files. I would like to import a csv in shiny app and then to be able to generate and download a table of this with kableExtra in pdf form with rmarkdown. I prefer kableExtra…

firmo23
- 7,490
- 2
- 38
- 114
0
votes
1 answer
How to replace a hyperlink with a word in table created with kableExtra and display it in a pdf document
Hi i have this example dataframe in the .rmd document below which i want to display as a table with the kableExtra package. The problem is that i cannot replace the urls of the second column with the "linkname" of the first and still keep them…

firmo23
- 7,490
- 2
- 38
- 114
0
votes
1 answer
Call to pdflatex in R/knitr constantly brings up new errors
I'm trying to print the results of a data frame as a table in a PDF using knitr, and more specifically kable. When I pass the data frame using kable(df, format = 'latex') it produces a basic, unformatted table. As soon as I try to add any styling…

Nicholas Hassan
- 949
- 2
- 10
- 27
0
votes
1 answer
kable_as_image knitr/kableextra rmarkdown
I am trying to use the function kable_as_image, which from my understanding will save the table as a image. My results though is not a table, dont know if I am doing something wrong as I cant find an example.
---
title: "Untitled"
author:…

MLEN
- 2,162
- 2
- 20
- 36
0
votes
1 answer
Pandoc Conversion Failure With Knitr
I think my problem is straightforward enough that it can be answered without a MRE. Here's the code that's throwing an error:
DSP %>%
kable(format = "latex",
digits = 2,
booktabs = T,
format.args = list(big.mark = ',')) %>%
…

Steve
- 575
- 4
- 18
0
votes
1 answer
Using pre-generated character strings with index method for kableExtra group_rows
Using Rmarkdown to generate a PDF. I'm bringing in lengthy text strings generated from a prior function to use as grouped row labels in a table. The normal kableExtra::group_rows method works fine. Since I have the same number of rows in each group,…

bcarothers
- 824
- 8
- 19
0
votes
1 answer
R-Markdown - kableExtra package - format = 'latex' not working
Using the kableExtra documentation. inside RMardown I am running:
```{r}
library(knitr)
library(kableExtra)
dt <- mtcars[1:5, 1:6]
kable(dt, format = "rmarkdown")
```
this actually outputs a table but I also get the following in the console:
…

Alex Bădoi
- 830
- 2
- 9
- 24
0
votes
0 answers
Appending blank rows in table using kable function from knitr
The kable function from knitr R package add blank row after every five rows by default.
knitr::kable(mtcars, format = "latex", booktabs = TRUE)
I wonder if there is a way to change this specification?

MYaseen208
- 22,666
- 37
- 165
- 309
0
votes
1 answer
kableExtra: Put a few rows of a table into many categories programmatically
Currently kableExtra 0.5.1 only supports Put a few rows of a table into one category. I wonder if there is any tweak to Put a few rows of a table into many categories programmatically like group_rows(kable_input = x, group_label = c("Group 1",…

MYaseen208
- 22,666
- 37
- 165
- 309