%% smart %% to=latex %% template=tex/poster.tex %% filter=tex/poster-filters.py %% biblatex
library('ggplot2') library('knitr') theme_set(theme_grey(base_size=10)) knitr::opts_chunk$set(fig.width = 16, fig.height = 4)
[columns=2]
[column]
R bookdown
[@R-bookdown] is an excellent R [@R-base] package for authoring books on programming languages. It has the potential to do much more than authoring R books if users costumize self-defined templates. However, the development of templates is difficult and unnecessary. Therefore I developed bookdownplus
[@R-bdp].
R bookdownplus
is a collection of multiple templates. With bookdownplus
you can easily
This poster you are viewing now is produced by R bookdownplus
.
Before starting, you have to install R, RStudio, bookdown package, and other software and packages (\ie Pandoc
, \LaTeX, rmarkdown
, rticle
, knitr
, etc.) which bookdown depends on. See the official manual of bookdown for details.
Installation:
devtools::install_github("pzhaonet/bookdownplus")
Run the following codes, and you will get some files (e.g. index.Rmd and body.Rmd) and folders in your working directory.
bookdownplus::bookdownplus()
Now press ctrl+shift+b
to compile it. Your will get a book file named index.pdf
in _book/
folder.
Write your own text in index.Rmd
and body.Rmd
, and build your own lovely book. Have fun!
Using bookdown
or rmarkdown
, users can insert figures into a document in a friendly way. Just embed the R scripts into your .Rmd
file(s) and compile it/them with knitr package, and the figures will appear automatically with high resolution and reproductivity.
ggplot(iris, aes(Sepal.Length, Petal.Length)) + geom_point(aes(color = Species)) + facet_wrap(~ Species)
Similarly to graphs, tables can be inserted either with R script or with markdown syntax.
knitr::kable( head(iris, 3), caption = 'IRIS data as an example.', booktabs = TRUE )
\printbibliography
[column]
bookdownplus
Some sample pages are displayed as follows. More details can be found in the tutorial book [@R-bdp].
\begin{figure}[htp] \includegraphics[width=.33\textwidth]{images/mail.pdf}\hfill \includegraphics[width=.33\textwidth]{images/mail.pdf}\hfill \includegraphics[width=.33\textwidth]{images/mail.pdf} \end{figure}
\begin{figure}[htp] \includegraphics[width=.33\textwidth]{images/mail.pdf}\hfill \includegraphics[width=.33\textwidth]{images/mail.pdf}\hfill \includegraphics[width=.33\textwidth]{images/mail.pdf} \end{figure}
\begin{figure}[htp] \includegraphics[width=.33\textwidth]{images/mail.pdf}\hfill \includegraphics[width=.33\textwidth]{images/mail.pdf}\hfill \includegraphics[width=.33\textwidth]{images/mail.pdf} \end{figure}
R bookdownplus
is an extension of bookdown
for academic and literal writing, especially for reproducible reports.
R bookdownplus
is still being developed. Feel free to join me either in contributing templates to my Github repo ^[https://github.com/pzhaonet/bookdownplus], or in writing the tutorial of R bookdownplus [@R-bdp].
Many thanks to Dr. Yihui Xie for his amazing generosity and incredible patience in helping me get into the wonderful world of R bookdown.
The open source codes from Github and R community are much appreciated.
\vskip1.5cm
[/columns]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.