Skip to content

Instantly share code, notes, and snippets.

@oganm
Last active October 5, 2016 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oganm/abef941dd42934b5ec4a35adc6b86850 to your computer and use it in GitHub Desktop.
Save oganm/abef941dd42934b5ec4a35adc6b86850 to your computer and use it in GitHub Desktop.
---
title: "Quicky and dirty: side-by-side plot and table"
author: "Omar AlOmeir"
output:
github_document
---
```{r}
library(ggplot2)
suppressMessages(library(dplyr))
#devtools::install_github("jennybc/gapminder")
library("gapminder")
gtbl <- tbl_df(gapminder)
```
<table>
<tr>
<th>
```{r results = 'asis', echo=FALSE}
tbl1 <- gtbl %>%
group_by(continent) %>%
summarise_each(funs(mean, median), gdpPercap)
knitr::kable(tbl1,'html')
```
</th>
<!--
```{r plotOuter,echo=FALSE}
ggplot(gtbl, aes(x = continent, y = gdpPercap, color = continent)) +
geom_point() + ggtitle("GDP per cap by continent")
```
-->
<th>
<img src="hede_files/figure-markdown_github/plotOuter-1.png" style="width:304px;height:228px;">
</th>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment