yDiv Course: Building R packages with Rstudio and GitHub

Date & time: Monday, September 23 - Tuesday, September 24, 2018 (2 full days)

Location: Leipzig, Deutscher Platz, German Centre for Integrative Biodiversity Research (iDiv) - Interim III, Metamorphosis,

Teachers: Alexander Zizka & Steffen Ehrmann, University of Leipzig/German Centre for Integrative Biodiversity Research

Detailed schedule and locations

Day 1 - 9:30 - 18:00

  • 9:30 Introduction
  • 10:00 Lecture “Main components of an R-package”
  • 10:45 Definition of the student projects
  • 11:15 Lecture “How to build an R package – Tools and workflow”
  • 12:00 Lunch
  • 13:00 Demo + Exercise 1 & 2: “Package skeleton and data”
  • 14:30 Demo + Exercise 3: “Functions and Documentation”
  • 16:30 Demo + Exercise 4: “Package building and checking”

Day 2 - 9:30 - 18:00

  • 9:30 Project work
  • 11:14 Lecture: “Package testing”
  • 12:00 Lunch
  • 13:00 Lecture: “Package documentation and release”
  • 14:00 Project work
  • 16:15 Student presentations
  • 17:15 Course evaluation and Wrap up

Before the course

Please:

Please do not hesitate to contact us if you have any questions.

Objectives

After this course, students will be able to

  1. understand the structure of R-packages and their main elements
  2. use up-to-date methodology to provide R code and data as R-package
  3. be familiar with common tools for packaging, including roxygen2, devtools, and GitHub

Background

R is a widely used tool for data analyses in ecology. Part of its success is due to the active community and the wide array of add-on packages contributed by scientists from across disciplines, via the CRAN network. R packages are an excellent and standardize way to distribute code and data to a huge community, and a great tool to ensure reproducible research. The course guides through the process of building and R package starting from conceptualization to testing. The course consists of introductory demonstrations coupled with hands-on exercises on the different stages of package building, plus time to work on a small example.

Project Assignment

During the course you will write a small data package based on your own data with guidance from the teachers.

Examination

Grades are pass/fail. Successful participants should participate in all course days and present a project on the last day. A certification will be issued for all participants.

Literature

https://r-pkgs.org/, chapters 2, 6-10 and 16.

Course level and requirements

This is a course for graduate students and researchers that routinely use R for analysis and want to learn how to distribute data and code as R package.

Number of students

max. 10

Language of instruction

English