How can I create a table with multiple panels in R Markdown?
Imagine I have two tables similar totableA = data.frame(a = c(1, 2, 3), b = c(2, 3, 4))tableB = data.frame(a = c(5, 6, 7), b = c(1, 8 , 9))list(tableA, tableB) |> kable()How can I get the two tables...
View ArticleCreating a Rmarkdown table with multiple cohorts
I am trying to create a table that has 5 cohorts of interest (plus the overall). As in the image the Group 3-5 are subgroups of Group 1 and I only want the overall column to be out of Group 1 and Group...
View ArticleHow to get these percentages out in a table like the example shown?
I'm trying to respecify an existing journal for a university assignment which tasks us with replicating the descriptive tables and regressions as similarly to that journal as possible.My first task is...
View ArticleHow to remove the name of first column of a table with collapse rows with...
I'm doing a table with a combination of collapsed and packed rows. I want to remove the name the firstof the column, but when I do so kable removes the collapsing.Any ideas?Here an reproducible example...
View ArticlePositioning of datasummary_skim() output in pdf file when knitting rmarkdown...
I'm writing to you to ask for help. More specifically, I am writing a paper as an rmarkdown file, which I can knit to pdf.Here is the R code of one of the chunks:{r...
View Articlepack_rows() creates an indentation in table produced with kable in rmarkdown
I'm trying to create a relatively complex table with kable in rmarkdown, where I need to pack_rows() with collapse_rows() and add_header_above().When I use pack_rows(), kable creates an indentation in...
View ArticleFull Cell in background color in html Rmarkdown table in R
I have a data frame called df that I want to print it in html format of Rmarkdown file. Globally I have set :options(knitr.table.format = "html") in R setup chunk.Below I wrote some code to conditional...
View ArticleHow to fill entire cell of a table with cell_spec() in kabeleExtra?
Following on from this question posed a while ago, does anyone know how I can fill the entire background of a cell using the cell_spec() function in kableExtra?I have some dummy data below, but I can...
View ArticleAssemble two separate kable table in the same html file [closed]
I have two kable tables: "table1" and "table2" created with kable extra.I can save them individually in a file with "save_kable()".However, I would like to be able to have both tables in the same HTML...
View Articleuse kableExtra in a for-loop with Rmd/beamer
I want to create multiple tabs in my R/beamer presentation. I have a code that is working :list_variables <- names(starwars)[sapply(starwars,is.character)]for (var in list_variables) { var_in <-...
View ArticleRendering kable/formattable in Quarto markdown, icons don't show up in output...
I'm trying to render a table in R Quarto where one of the columns contains a color-coded symbol. When I run it within RStudio, everything looks as expected, but when I hit render the symbols are...
View ArticleFormat Text Within color_bar {formattable}
I am formatting a table using formattable:color_bar and would like to add a comma as a thousands separator as well as adjust the colour of the font. For cells where I don't use color_bar I see how I...
View ArticleRemoving large blank space from output within .Rmd file while using kable()...
I am using RStudio to create a pdf using RMarkdown.Whenever I use knitr::kable() to display a dataframe, it generates the appropriate dataframe in the output below the code chunk, but also incorporates...
View ArticleCollpase_rows middle alignment not working properly
I'm trying to generate a nice table using Rmarkdown to export in pdf, to do so I'm using kable and its formatting options and the function collpase_rows to merge some cells.Here it's the problem, I'm...
View ArticleWas there a `datasummary::modelsummary` update that made it glitchy with...
I am using the following code to create a latex table using modelsummary and kableExtra. The code used to work but it seems that either modelsummary or kableExtra made some changes that made it harder...
View ArticleHow to vertically align two cells of a row containing image and text in...
I am using a table to layout a header with one cell containing an image and another one containing a text, but I can't vertically align them properly.Here is my code snippet:---output:...
View ArticleHow to save html output in Rmarkdown
This is the first time I am using rmarkdown to knit a document into an html output. I see the output as an html document, no problem. However the output is linked to my personal working directory...
View ArticleR Markdown - is there a way to use the legend/caption formatting from kable()...
I'm using the formating kable_paper("hover") for a table that I found here:https://cran.r-project.org/web/packages/kableExtra/vignettes/awesome_table_in_html.htmlThe caption for that table has a...
View ArticlekableExtra not recognizing qwrap2 styling
I recently updated my R and Rstudio, and now kable doesn't seem to recognizing styling from qwraps2. Here's a reproducible example with the output I get in Viewer.options(qwraps2_markup =...
View ArticleAdding a LaTeX reference label to a table in modelsummary
I'm trying to produce tables in R (not RMarkdown, as this question helps answer) with modelsummary and I'm having a tough time adding reference labels (e.g., tab:hello). As Vincent points out in this...
View Article