Skip to content

A short introduction demonstrating some specific tricks for using R Markdown to write scientific publications

License

Notifications You must be signed in to change notification settings

eco-data-science/publications-with-rmarkdown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Publications with R Markdown

You can view the presentation for this material here

This repository is equipped with renv

  1. Make sure you have some sort of LaTeX distribution installed on your computer. If you’ve ever successfully Knit an R Markdown document to PDF, you should be fine. If you’re not sure, I recommend using tinytex.
install.packages('tinytex')
tinytex::install_tinytex()
  1. Fork the clone to your machine, or just download the repo.

  2. Open R and set your working directory of the cloned repository (or just use RStudio projects)

  3. This project is set up with renv to manage package dependencies. Inside R (and with your working directory set correctly) run renv::restore(). E.g. if you stored this repo in "/Users/danovan/projects/publications-with-rmarkdown", when you type getwd in the R console you should see "/Users/danovan/projects/publications-with-rmarkdown". You will run into some odd problems if your working directory is set to say "/Users/place-where-every-project-lives and this project is just a folder somewhere in that mess.

Follow all prompts that come up after running renv::restore(). This will install the correct versions of all the packages needed to replicate our results. Packages are installed in a stand-alone project library for this project, and will not affect your installed R packages anywhere else.

The preview version of RStudio has some neat features for R Markdown. If you’d like to install it you can do so here but it’s not needed.

R Markdown for Publications

A short presentation for Eco-Data-Science discussing solutions to some specific issues with using R Markdown for scientific publication.

There are countless great R Markdown materials out there, e.g. Markdown: The Definitive Guide. However, weird as it may seem, we in academia are not the primary user for R Markdown! I’ve found as a result that almost all of the materials out there are geared towards more industry / informal sharing of documents. There aren’t a lot of resources dealing with all the specific issues though of getting your work into the arcane requirements of the Academic Journal of Scientific Seriousness.

The goal of this talk is to walk you through how to use R Markdown for the specific task of academic publications.

This is not an intro to R Markdown: I will assume that you know how to do the basics in R Markdown

  1. Why R Markdown for Scientific Publications (and dissertations/theses!)

  2. A quick discussion of rticles

  3. Formatting References

  4. Cross-referencing

    • Figures, tables, equations, sections
  5. Workflow

    • Updating results
    • Collaborating! i.e. what to do without track changes
  6. If time permits, a quick tour of the gauchodown template for UCSB dissertations/theses

About

A short introduction demonstrating some specific tricks for using R Markdown to write scientific publications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 82.9%
  • JavaScript 11.9%
  • TeX 2.4%
  • CSS 2.0%
  • R 0.8%