Skip to content

Instantly share code, notes, and snippets.

@kohske
Created July 12, 2012 08:01
Show Gist options
  • Select an option

  • Save kohske/3096558 to your computer and use it in GitHub Desktop.

Select an option

Save kohske/3096558 to your computer and use it in GitHub Desktop.
knitr demo
```{r setup}
library(xtable)
library(ggplot2)
library(gridExtra)
options(xtable.type = "html")
```
```{r table1, results='asis'}
xtable(head(iris))
```
```{r table2, results='asis'}
xtable(tail(iris))
```
```{r fig1, fig.height=3, fig.widht=5}
p1 <- qplot(1:3, 1:3, colour = 1:3)
p2 <- qplot(letters[1:3], 1:3, geom = "bar")
grid.arrange(p1, p2, nrow = 1)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment