Skip to content

Instantly share code, notes, and snippets.

@lcolladotor
Last active February 17, 2018 18:19
---
title: RmdTemplate
author: ''
date: '2018-02-17'
slug: RmdTemplate
categories:
- rstats
tags:
- Fun
output:
blogdown::html_page:
toc: true
fig_width: 5
fig_height: 5
---
```{r bibsetup, echo=FALSE, message=FALSE, warning=FALSE}
## Load knitcitations with a clean bibliography
library('knitcitations')
cleanbib()
cite_options(hyperlink = 'to.doc', citation_format = 'text', style = 'html')
bib <- c('knitcitations' = citation('knitcitations'))
```
Start post
```{r 'example plot'}
plot(1:10, 10:1)
```
If you want to include a screenshot, copy the file to static/post/*_files/ and link it like this ([background](https://github.com/rstudio/blogdown/issues/239)):
![](/post/2018-02-17-RmdTemplate_files/me.jpg)
Example for linking an image and centering it:
<center>
<a href="https://google.com"><img alt = 'google' width='600' src='/post/2018-02-17-RmdTemplate_files/me.jpg' /></a>
</center>
### Reproducibility
```{r reproducibility}
## Reproducibility info
library('devtools')
options(width = 120)
session_info()
```
### References
Citations made with `knitcitations` `r citep(bib[['knitcitations']])`.
```{r bibliography, results='asis', echo=FALSE, cache=FALSE}
## Print bibliography
bibliography()
```
### Want more?
Search [#rstats](https://twitter.com/search?q=%23rstats).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment