Reproducible Research with R Packages

Netherlands eScience Center

Online

September 14 - October 05, 2022 (weekly, on Wednesdays)

9:00 - 13:00 CEST

Instructors: Barbara Vreede, Lieke de Boer

Helpers: Eva Viviani, Pranav Chandramouli, Djura Smits, Ji Qi

Some adblockers block the registration window. If you do not see the registration box below, please check your adblocker settings.

General Information

The eScience Center offers a range of free workshops and training courses, open to all researchers affiliated with Dutch research organizations. We organize workshops covering digital skills needed to put reproducible research into practice. These include online collaboration, reproducible code and good programming practices. We also offer more advanced workshops such as GPU Programming, Parallel Programming and Deep Learning.

This workshop will help you make your research reproducible, by taking your R script and turning it into a shareable package.

R packages are no more and no less than a standard way of structuring your work. The standardization makes packages easily installable and shareable, and allows others to reuse your code in a painless way, making your research more reproducible.

But by turning your script into a package you achieve more than reusability: in doing so, you become a better programmer. In the structure of a package, best software development practices are implemented. You will learn to write tests and documentation, and help your users get started with a vignette. At the end of this workshop, we aim to have made your code more robust, and your programming experience more enjoyable.

Note: This workshop is scheduled as four weekly sessions, giving you time in between meetings to apply the things you learn to your own code.

Who: 

The participants should:

  • Be familiar with R and RStudio.
  • Know how to create their own R functions.

Where: This training will take place online. The instructors will provide you with the information you will need to connect to this meeting.

When: September 14 - October 05, 2022 (weekly, on Wednesdays), 9:00 - 13:00 CEST.

Requirements: Participants must have access to a computer with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).

Accessibility: We are dedicated to providing a positive and accessible learning environment for all. Please notify the instructors in advance of the workshop if you require any accommodations or if there is anything we can do to make this workshop more accessible to you.

Contact: Please email or training@esciencecenter.nl for more information.


Code of Conduct

Participants are expected to follow those guidelines:

Syllabus

Schedule

This workshop is scheduled on four separate days. This allows you to work on your package in between the sessions, implementing the lessons you learned during our meetings together. Please schedule dedicated work time in your calendar, so you can take full advantage of the workshop.

Day 1. Wed 14 September 2022

09:00 Welcome and icebreaker
09:15 Introduction, Accessing packages
10:15 Coffee break
10:30 Getting started
11:30 Coffee break
11:45 Licenses
12:45 Wrap-up
13:00 END

Day 2. Wed 21 September 2022

09:00 Welcome and icebreaker
09:15 Writing our own functions
10:15 Coffee break
10:30 Testing
11:30 Coffee break
11:45 Test-driven development
12:45 Wrap-up
13:00 END

Day 3. Wed 28 September 2022

09:00 Welcome and icebreaker
09:15 Recap and lessons learned
10:15 Coffee break
10:30 Dependencies, Data
11:30 Coffee break
11:45 Documenting your package
12:45 Wrap-up
13:00 END

Day 4. Wed 5 October 2022

09:00 Welcome and icebreaker
09:15 Recap and lessons learned
10:15 Coffee break
10:30 Vignettes
11:30 Coffee break
11:45 Sharing our packages
12:45 Wrap-up
13:00 END

All times in the schedule are in the CET timezone (Amsterdam time).


Setup

To participate in this workshop, you will need access to software as described below. In addition, you will need an up-to-date web browser.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

Software setup

This lesson assumes you have current versions of the following installed on your computer:

  1. the R software itself, and
  2. RStudio Desktop.

In addition, you will need an account on GitHub. Create one here.

You will also need to install the following packages:

They can be installed by typing the code below in the R console:

$ install.packages(c("devtools", "rmarkdown", "roxygen2"))

If the installation went right, the code below should throw no errors:

$ library(devtools)
$ library(rmarkdown)
$ library(roxygen2)

Please contact us in advance if you are experiencing problems.

During the workshop, we will take an R script, and transform it into a shareable R package. You are encouraged to bring your own project, though we will have a toy project to use if you are unable to. Packages are based around functions, so it is important that you know how to write functions, and that at least a single function is present in your script.

Install the videoconferencing client

If you haven't used Zoom before, go to the official website to download and install the Zoom client for your computer.

Set up your workspace

Like other Carpentries workshops, you will be learning by "coding along" with the Instructors. To do this, you will need to have both the window for the tool you will be learning about (a terminal, RStudio, your web browser, etc..) and the window for the Zoom video conference client open. In order to see both at once, we recommend using one of the following set up options:

This blog post includes detailed information on how to set up your screen to follow along during the workshop.