Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The good reasons to write scientific reports and manuscripts in LaTeX or Markdown are: improved document integrity (always), simplicity (not always) and reproducibility (always). I prefer the lightweight Markdown over rich but more complex LaTeX — I think that lightweight is good for reproducibility. I am also in love with knitr.

Hence, I’ve made a really simple template for the classical manuscript format for R markdown and knitr. Here are the resulting .pdf and .html.

The template contains the four usual components of any scientific manuscript:

• equations (using LaTeX syntax)
• table with caption (done by kable package, but you can also use xtable)
• figure with caption
• citations and references (done by knitcitations package)

The template uses Methods in Ecology and Evolution reference style, which is stored in the mee.csl file.

The template does not have line numbers nor wide line spacing. To add these you will have to edit the .tex file, i.e. you will need to learn a little bit of LaTeX.

How to use the template?

1. Go to the GitHub repository.
2. Save the .Rmd and .csl files to your local folder.
3. Open the .Rmd file with R studio.
4. Edit freely.
5. Hit the Knit html or Knit PDF button.