Uploaded February 2026 | Updated November 2026, 2 days ago
Introduction to building (better) R packages - Nicola Rennie
Abstract: There are many benefits to turning your R scripts or functions into a package, like making your code easier to re-use, easier to share with others, easier to document, and easier to test. But the process of writing a package can feel intimidating, especially if you haven't done it before. But it doesn't need to! In this interactive workshop, we'll discuss:* What things you need to make a package and how to create them* How to write functions (in a package-friendly way) and add them to a package* How to write documentation and examples for functions* Best practices for package development* How to share your package with other people* Useful resources. By the end of this workshop, you will have made an R package! The session aims to be introductory, so you don't need any previous experience of building R packages (or even writing functions!) but some basic knowledge of R will be useful. If you're already a seasoned R package developer, you're also welcome to attend and hopefully you'll still pick up a few package development tips!
Resources mentioned in the workshop:
* Workshop slides: nrennie.rbind.io/r-pharma-2025-r-packages
* R for Data Science chapter on functions: r4ds.hadley.nz/functions.html
* R Packages: r-pkgs.org
* Nicola's data science resources: nrennie.rbind.io/data-science-resources
Introduction to building (better) R packages - Nicola Rennie
Abstract: There are many benefits to turning your R scripts or functions into a package, like making your code easier to re-use, easier to share with others, easier to document, and easier to test. But the process of writing a package can feel intimidating, especially if you haven't done it before. But it doesn't need to! In this interactive workshop, we'll discuss:* What things you need to make a package and how to create them* How to write functions (in a package-friendly way) and add them to a package* How to write documentation and examples for functions* Best practices for package development* How to share your package with other people* Useful resources. By the end of this workshop, you will have made an R package! The session aims to be introductory, so you don't need any previous experience of building R packages (or even writing functions!) but some basic knowledge of R will be useful. If you're already a seasoned R package developer, you're also welcome to attend and hopefully you'll still pick up a few package development tips!
Resources mentioned in the workshop:
* Workshop slides: nrennie.rbind.io/r-pharma-2025-r-packages
* R for Data Science chapter on functions: r4ds.hadley.nz/functions.html
* R Packages: r-pkgs.org
* Nicola's data science resources: nrennie.rbind.io/data-science-resources










