This repository holds the materials for a workshop on writing reproducible research papers with R Markdown, first taught at Campus Luzern in March 2020.
Unless otherwise noted, all material is copyright Resul Umit, licensed CC-BY-SA 3.0. An easy to read summary of this permissive licence is available on the Creative Commons website.
The workshop is divided into ten parts. Most parts include exercises — 40+ in total.
The slides for the workshop are available to view at https://resulumit.com/teaching/rmd_workshop.html. These HTML slides are created with xaringan
package (Xie, 2020).
See the presentation
directory of this repository for the source files underlying the slides. The same directory also includes the PDF version of the slides, which might come handly if the HTML version is too large for your browser to function. This is indeed a known problem for some Safari users.
The remaining workshop materials are available in a separate branch of this repository, called materials. It includes the following:
-
manuscript\reproduce_this.pdf
- a document, formatted in Word but saved as PDF, to be re-created with R Markdown
- random sentences in the document are generated with the
stringi
package (Gagolewski, 2020) - figures and tables are based on a fabricated dataset (
journals.csv
, see below) - key sections in-need of attention are highlighted
-
manuscript\journals.Rmd
- an R Markdown document to work on during the workshop
- includes unformatted text from
reproduce_this.pdf
to save time - major components, such as paragraphs and tables, are numbered and marked in comments to facilitate navigation
- includes unformatted text from
- an R Markdown document to work on during the workshop
-
manuscript\references.bib
- a BibTeX document with three fabricated references
-
manuscript\apa_7th.csl
- a Citation Style Language document, with APA (7th Edition) referencing style (Wiernik, 2020)
-
data\journals.csv
-
a dataset created with the
fabricatr
package (Blair et al., 2019), imagined to explore the Google Scholar rankings of fictitious journals -
includes the following variables
- name: journals (1090 random titles)
- origin: geographic origins (five continents)
- branch: major discipline of journals (four branches)
- since: time of first publication (years)
- h5_index: H5 Index (integers)
- h5_median: H5 Median (integers)
- english: English (1) vs. other-language (0) journals
- subfield: subfield (1) vs. generalist (0) journals
- issues: number of issues published per year (integers)
-
-
image\google_scholar.png
- a screeenshot image of the Google Scholar homapage, copyright Google, LLC
-
test\run_this.R
- an R script that
- installs the packages needed for the workshop
- attempts to knit an R Markdown into PDF file
- useful for tasking participants with a pre-workshop setup
- an R script that
-
test\the_test.Rmd
- an R Markdown file, to be used for the attempt in
test\run_this.R
- an R Markdown file, to be used for the attempt in
Blair, G., Cooper, J., Coppock, A., Humphreys, M., Rudkin, A. and Fultz, N. (2019). fabricatr: Imagine your data before you collect it. R package, version 0.10.0.
Gagolewski, M. (2020). stringi: Character String Processing Facilities. R package, version 1.4.6.
Wiernik, B. M. (2020). American Psychological Association 7th edition (no ampersand). Citation style language file, version 1.0.
Xie, Y. (2020). xaringan: Presentation Ninja. R package, version 0.18.