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 usextable
) - 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?
- Go to the GitHub repository.
- Save the
.Rmd
and.csl
files to your local folder. - Open the
.Rmd
file with R studio. - Edit freely.
- Hit the Knit html or Knit PDF button.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.