Skip to content

Instantly share code, notes, and snippets.

@haozhu233
Created November 10, 2017 21:39
Show Gist options
  • Select an option

  • Save haozhu233/4347887ca8ac7743dd87e7861408110a to your computer and use it in GitHub Desktop.

Select an option

Save haozhu233/4347887ca8ac7743dd87e7861408110a to your computer and use it in GitHub Desktop.
2 tables in the same row
---
output: html_document
---
```{r}
library(tidyverse)
library(kableExtra)
library(knitr)
a <- mpg %>%
filter(displ > 2) %>%
head() %>%
kable("html", caption = "Test 1")
b <- mpg %>%
filter(model != "a4") %>%
head() %>%
kable("html", caption = "Test 2")
shiny::fluidRow(
shiny::column(6, shiny::HTML(a)),
shiny::column(6, shiny::HTML(b))
)
```
@darh78

darh78 commented Nov 11, 2017

Copy link
Copy Markdown

Thanks, @haouzhu233. It worked perfectly!.
I thought just adding more tables with the column function would add more tables on the same row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment