library(xtable)
library(ggplot2)
library(gridExtra)
## Loading required package: grid
options(xtable.type = "html")
xtable(head(iris))
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.10 3.50 1.40 0.20 setosa
2 4.90 3.00 1.40 0.20 setosa
3 4.70 3.20 1.30 0.20 setosa
4 4.60 3.10 1.50 0.20 setosa
5 5.00 3.60 1.40 0.20 setosa
6 5.40 3.90 1.70 0.40 setosa
xtable(tail(iris))
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
145 6.70 3.30 5.70 2.50 virginica
146 6.70 3.00 5.20 2.30 virginica
147 6.30 2.50 5.00 1.90 virginica
148 6.50 3.00 5.20 2.00 virginica
149 6.20 3.40 5.40 2.30 virginica
150 5.90 3.00 5.10 1.80 virginica
p1 <- qplot(1:3, 1:3, colour = 1:3)
p2 <- qplot(letters[1:3], 1:3, geom = "bar")
grid.arrange(p1, p2, nrow = 1)

plot of chunk fig1