Package Development

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

Why automate? Easier for…

Regular work, teaching, reproducing problems.

Goals for today

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

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

Website tour


Slides, demo notes, further resources

Time for the workshop 🚲

Alternating between watching and practicing in breakout rooms.

Two bikes parked

Picture by Pixabay on Pexels.

Back from the workshop

{usethis} for all the things.

Like saving the settings of a bike.

No need to adjust the saddle height every time you go for a ride!

Two wheels always turning 🚲

  • loading, trying out, editing.

  • running (adding) the tests, editing. Tests are a safety measure and a time saver!

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


See you at the next package development training?