Topic | Duration | |
---|---|---|
2024-11-04 | ||
08:00 - 09:20 | What is a Package? Package Structure and State | 80 min |
09:20 - 09:35 | Break | 15 min |
09:35 - 10:55 | Package Creation and Metadata | 80 min |
10:55 - 11:10 | Break | 15 min |
11:10 - 12:30 | Documentation | 80 min |
2024-11-05 | ||
08:00 - 09:20 | Testing & Dependencies | 80 min |
09:20 - 09:35 | Break | 15 min |
09:35 - 10:55 | Continuous Integration & Design Principles | 80 min |
10:55 - 11:10 | Break | 15 min |
11:10 - 12:30 | Design Principles | 80 min |
2024-11-06 | ||
08:00 - 09:20 | Website Creation & Using the Tidyverse in Your Package | 80 min |
09:20 - 09:35 | Break | 15 min |
09:35 - 10:55 | Using the Tidyverse in Your Package part 2 | 80 min |
10:55 - 11:10 | Break | 15 min |
11:10 - 12:30 | Communicating with your Users & Distribution & General Discussion | 80 min |
Fundamentals of R Package Development
ποΈ November 4-6, 2024 β±οΈ 08:00 - 12:30 PST / 12:00 - 16:30 EST
π Online
Overview
In R, the fundamental unit of reusable code is a package, containing helpful functions, documentation of how to use those functions, and sometimes example data. This workshop will teach the fundamentals of package development in R, using the βdevtoolsβ family of packages including usethis, testthat, and roxygen2, as well as principles that make developing packages efficient and even fun.
You will learn the structure of a package, how to organize your code, and workflows to help you develop your package from the ground up. You will learn how to write good documentation so that users can learn how to use your package, and how to use automated testing to ensure it is functioning the way you expect it to, now and into the future. You will also learn how to check your package for common problems, and how to distribute your package for others to use.
After we go through the fundamentals, we will introduce more advanced topics that package developers will face as their packages get larger and/or more complex. This may include topics such as design principles, including example data in your package, and advanced testing techniques.
This will be an online, interactive workshop delivered virtually. We will be using the RStudio IDE to work through the materials, as it has been designed to work well with the development practices we will be featuring.
This workshop is for you if youβ¦
- You have written several R scripts and find yourself wondering how to reuse or share the code youβve written;
- You know how to write functions in R;
- You find yourself copying and pasting the same chunks of code from project to project;
- You are looking for a way to take the next step in your R programming journey
- You may have written or contributed to a package or two, but you want to be more efficient and gain a deeper understanding of R packages.
Prework
Please ensure you have completed the steps in System Setup
Schedule (All times PST)
Instructors
Andy Teucher is a freelance data scientist and package developer with a passion for teaching others how to use data science tools to make their work more efficient and reproducible. His background is in conservation biology, with an MSc in Ecology from the University of Calgary. He has spent much of his career as a data scientist in government, where he made it his mission to promote and teach open, reproducible data science practices. He has written many R packages for internal use in his teams as well as for a broader audience, with several hosted on CRAN. Andy especially enjoys developing packages to make it easier to work with spatial data in R. Andy is a certified Software Carpentry and Data Carpentry instructor, and has led many workshops teaching programming skills to scientists and data professionals.
Sam Albers is a data scientist with 15 years experience writing code for scientific research. Sam wrote his first line of code to process data collected on salmon spawning in the Horsefly River watershed. Gradually, he ended up spending more time writing code than studying salmon and moved into a full time data scientist role in government. During that time, Sam developed several packages to facilitate reproducible research and gained a solid foundation in what it takes to build a good R package.
This work is licensed under a Creative Commons Attribution 4.0 International License. http://andyteucher.ca/pkg-dev-psc-2024-11/