Event Details
Event Title Modular Design and Automated Testing in R (online)
Location Online (ZOOM)
Sponsor H.W. Odum Institute
Date/Time 04/18/2023 - 04/20/2023
Event Price
For more information, contact the event administrator: Jill Stevens jill_stevens@unc.edu
Event Presenters
Name Title  
Matthew Wigginton Bhagat-Conway PhD Assistant Professor in the Department of City and Regional Planning and a consultant in the Odum Institute for Research in Social Science.
Sorry, This event has expired
Session Status Session Session Date Start Time End Time Cutoff Session Price
Expired Modular Design and Automated Testing in R (Parts 1 AND 2) 04/18/2023 - 04/20/2023 9:30 AM 12:30 PM 04/14/2023 $0.00
Expired Modular Design and Automated Testing in R (Part 2 ONLY) - Must have taken Part 1 FALL 2022 04/20/2023 9:30 AM 12:30 PM 04/14/2023 $0.00
 
This 2-part, 6-hour course will be split over 2 days and offered via Zoom. Attendance is required as the course will not be recorded.

Research is relying on increasingly complex code. However, most academics have not received formal training in software development. This course will introduce participants to some of the best practices of professional software development. Participants will learn to structure their R code into reusable functions and store those functions as separate scripts and/or packages. Participants will learn to write automated tests for their functions, to help confirm that results are as expected and to ensure that future changes to code do not cause unexpected changes to results.

We will also discuss how to create reproducible "environments" that record package versions in use to help avoid package version incompatibilities and ensure that results can be replicated even months or years after the original analysis.

Many R users code using the R markdown or Quarto systems that allow integrating text with code. We will discuss how these useful tools can affect modular design, and how to use them together. No previous R Markdown or Quarto experience is required. 

Modular design is best paired with a version control system. We will discuss how modular design practices integrate with Git and Github, and how to set up "continuous integration" so that automated tests are run each time code is changed.

The course will primarily consist of a hands-on exercise to restructure a single long analysis file into functions and automated tests. 

The "Version Control with Git and Github" course is a prerequisite for this course. Participants who previously completed the Modular Design and Automated Testing with R in the fall may register for only Day 2 of this course if they desire, as Day 1 will cover the same topics as the fall course.

The course will primarily consist of a hands-on exercise to restructure a single long analysis file into functions and automated tests.