| 1 |
## ---- echo = FALSE, message = FALSE------------------------------------------- |
| 2 |
knitr::opts_chunk$set(collapse = T, comment = "#>") |
| 3 |
library(pander) |
| 4 |
library(tables) |
| 5 |
panderOptions('knitr.auto.asis', FALSE) |
| 6 |
panderOptions('plain.ascii', TRUE) |
| 7 |
|
| 8 |
## ----------------------------------------------------------------------------- |
| 9 |
pander(head(iris)) |
| 10 |
pander(head(mtcars[1:5])) |
| 11 |
pander(tabular( (Species + 1) ~ (n=1) + Format(digits=2)* |
| 12 |
(Sepal.Length + Sepal.Width)*(mean + sd), data=iris )) |
| 13 |
|
| 14 |
## ----------------------------------------------------------------------------- |
| 15 |
methods(pander) |
| 16 |
|
| 17 |
## ----------------------------------------------------------------------------- |
| 18 |
evals('1:10') |
| 19 |
|
| 20 |
## ----------------------------------------------------------------------------- |
| 21 |
str(Pandoc.brew(text ='Pi equals to `<%= pi %>`. And here are some random data: `<%= runif(10)%>`')) |
| 22 |
|
| 23 |
## ----------------------------------------------------------------------------- |
| 24 |
pots <- panderOptions("table.style") |
| 25 |
panderOptions("table.style", "simple") |
| 26 |
pander(mtcars[1:3, 1:4]) |
| 27 |
pander(head(iris)) |
| 28 |
panderOptions("table.style", "grid") |
| 29 |
pander(head(iris)) |
| 30 |
panderOptions("table.style", pots) |
| 31 |
|