Lesson 11 Resources

11.1 Credits

11.1.1 General resources

  • Wickham and Grolemund, “R for Data Science”, 2017, O’Reily
  • Field et. al., 2015, “Discovering Statistics Using R”, Sage Publications Ltd.
  • Sr. David Spiegelhalter, “The Art of Statistics”, 2019, Pelican Books

11.2 License resources

  • Choose a License. This website helps you to choose the best license for your project.
  • Using licenses on GitHub. This GitHub documentation page provides information about how to add and apply licenses to your GitHub repositories.

11.3 Git resources

11.3.1 Git command line

  • Git - the simple guide. This web resource provides a simple explanation of Git and its commands.
  • Pro Git book. This book explains the principles behind Git and also provides a great introduction to the Git command line.

11.3.2 Git and R(Studio)

11.10 Github resource list

There are many ‘R resources lists’ to be found on the internet. Here, I just mention three that I liked.

11.13 old Mendeley workflow for citations

For this example, we will use Mendeley. Mendeley is a free reference manager. If you are not yet using a reference manager, you start doing so right now. It will save you a lot of time in the future.

Go the the Mendeley website, download and install Mendeley and open the program. (note: if you already use a reference manager, check if it provides BibTeX output. We need a .bib file later.)

If this is your first time using Mendeley: you can simply drag and drop pdf files into Mendeley. It will automatically start searching the web for the meta data. If your pdf is a published paper, there will be a lot of meta data available.

How to get Mendeley into RMarkdown

Special thanks to Rosanna van Hespen for sharing her workflow online!

  1. First, start a new .Rmd file.

  2. Next, we need a file with all the references Mendeley is currently managing for you. At least 1 random paper and 1 self-made pdf. Mendeley can make a file containing this information: a .bib file. You can have Mendeley automatically updating this file for you, but as we are already syncing stuff with github, we will not make things this complicated for now. So, you will need to repeat this step if you add new papers to Mendeley.

  • Select the citations you want to include
  • Click File –> Export
  • Select the BibTeX format and give your file a name
  • choose an export location (the folder with your new .Rmd file)
  1. Go back to your .Rmd file and change the YAML header: write ‘bibliography: library_projecticum.bib’ (or whatever is the name of your .bib file), so your header will look like something this:
title: "Untitled" 
output: html_document 
bibliography: library_projecticum.bib
  1. Go back to Mendeley, and check the citation key of the random paper we downloaded. You can find it in the detail tab at the right of the screen, scroll down a bit. In my example below, it is VanLissa2021

Scroll down a bit:

You can now cite papers it in your .Rmd using citation keys:

They said something really smart [@VanLissa2021].

or two people:

Some people agree with her [@dehaan08; @vangestel18].

or include additional information:

As do colleagues[see @teunis99, pp. 33-35; also @svanoef04, ch. 1].

or inline:

@smith04 [p. 33] says blah.

Use a minus sign if you don’t want to include the names:

Van der Ploeg says so too [-@vdploeg04].


CC BY-NC-SA 4.0

Xie, Yihui. 2019. Bookdown: Authoring Books and Technical Documents with r Markdown. https://CRAN.R-project.org/package=bookdown.