R Forwards Package Workshop Recap

Last Saturday, February 23, 2019, took place the R Forwards Women’s Package Workshop in Chicago at Center for Spatial Data Science, where Angela Li (CivicAngela) and Stephanie Kirmer (data_stephanie) conducted the workshop. 40 R-Ladies attended from different parts of the Chicago area to increase their abilities with R.

Image Caption: Women’s Package Development Workshop Attendees

Image Caption: Women’s Package Development Workshop Attendees

What do we learn?

We learned about packages, which are the fundamental units of reproducible R code. Also, we worked on how to create our package, the documentation associated and how to include a unit test to the process.

We saw a variety of subjects in a friendly and collaborative environment. This course was very hands on, and both instructors solved many questions, or for the person sitting next to you. Both Angela and Stephanie presented each subject, and after that, we learned by doing simple exercises about the matter, and if eventually, you can not have any idea about how to continue you can ask for help about how to solve the problem. Just keep going and keep learning.

Material for this workshop

You can find all the material of the course in this link: Chicago 2019 Forwards Workshop.

Allow me to introduce the 5 decks presented during the workshop:

First Deck: Package Development

Check the presentation here:

This presentation is about R packages, Angela suggested to check how many R packages have already installed on our computer (you can’t believe the numbers :) ), the most common sources for R packages (Cran and Github), and an explanation of the difference (and similarities) between developing a package and developing a script.


  • A review for R package from the theory
  • Use of several commands like: R.home(), list.files(R.home()), R.version

Second Deck: Packages & R Code

During this second part, Angela revisited the definition of a package. Also, she analyzed the reasons to use RStudio projects. After this introduction, we started with the process of building a simple package.

Later Stephanie took over explaining what git and GitHub are, and also she spent a moment speaking about version control, ending this second part making a project in RStudio from our repo.

Check the presentation here


Third Deck: Unit Test

During this third part, we reviewed the reason-why is a great idea to use unit test: because it is an excellent way to be sure that our functionalities continue working after each change.
We also tested the coverage for our package. As a final recommendation, we should include checking our work as a regular part of the iterative process to develop a package (or in any development).

Check the presentation here:


  • Theory and practice about how to include unit test in your code
  • Useful resource: Testing

Fourth Deck: Documentation

During this fourth part, Stephanie spoke about documentation and why it is always a good idea to include it in your development process: because documentation is the way to preserve the information about the tools. She reviews Markdown and Roxygen, and also we opened up some function in R to check the Roxygen header and read the documentation, later we included a header in some of the functions created along the workshop. Also, we used Vignettes, Read.me and news to explain how our packages work.

Check the presentation: here


Fifth Deck: Share

During this fifth part, we revisited the concept of licenses and the three main open source licenses (CC0, MIT, and GPL). We learned how to use helper to set up the type of license. We got about dependencies and the three types of dependencies (imports, suggests, and depends). We also saw how to access functions in imported packages. We spoke about the reasons to use depends instead on imports. Another concept presented was Automated checking to run automated checks for common problems in R packages. Moreover, also we saw something about how to make a submission to CRAN.

Check the presentation: here


Additional Materials:

There are a lot of resources to continue digging into all the concept presented, some of them are:

About the Author:

Florencia Mangini is a software engineer interested in using data to make a positive impact on society. She enjoys learning and using R, with a focus on data visualization and data mining. She loves to write about business analytics, project management and data science in her blog: www.thinkingondata.com.