Become an R Package Developer!

👋 Hello!

Bonjour from Nancy !

My R package development creds

I really ❤️ R package development

My R package development creds

Contributed to

Why develop an R package?

Easiest way to share code/data/R Markdown templates… with

  • (future) you,

  • the collaborators you know,

  • and the collaborators you don’t.

Why learning about package development?

Jon Calder’s very good wording

  • To share code (and data);

  • To leverage existing tooling;

  • To contribute to other packages.

Who can write a package? YOU!

Susan Johnston’s wise words.

  • Can you open R or RStudio?

  • Can you install a package?

  • Have you ever written a function in R?

  • Could you learn how to write a function in R?

➡️ You can write a package in R!

Learn about functions

What is a package?

Pour réduire ses craintes, il faut se dire que ce n’est ni plus ni moins qu’un dossier organisé d’une manière contrainte.

To be less afraid you have to tell yourself that it’s simply a folder organized in a constrained way.

Sébastien Rochette


Small monster saying to automate all the things

Meme image by Allie Brosh

Automating… How?

Remember Clippy?

Automating… How?

Get to know an actually useful Clippy, {usethis}!

usethis logo, a robot

usethis and co

Goals for today

  • Get to know (the best 😇) tools for package development;

  • Learn that there is no magic, only practice and ✨ tips ✨;

  • Think about whether to contribute to open-source packages.

Website tour


Slides, notes from the demo, further resources, comments!

Time for a demo 🚀

Notes on the course website.

Also refer to the Whole game chapter of the R packages book by Hadley Wickham and Jenny Bryan.

Back from the demo

R CMD check (devtools::check())

So what’s really hard?

  • Writing good code.

  • Writing a good interface.

  • Writing good docs.

More with packages

Less with packages


Write them in the doc.

Time for a break! ☕