Become an R Package Developer!

👋 Hei!

I’ve never been in Bergen

😭

But… I’ve been to Norway two times when I was an intern in Gothenburg, Sweden!

Maëlle in front of royal palace in Oslo

Me in front of royal Palace in Oslo, 2010

Maëlle standing and laughing on a dirt road

Me in (near?) Evenstad, 2010. Picture by Anne-Sophie Bonnet-Lebrun

My R package development creds

I really ❤️ R package development

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

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

Automation!

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

Website tour

🔗 https://tiny.cc/r-pkg

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())

Sign near a dirt road, indicating there might be farm animals

Picture by Anne-Sophie Bonnet-Lebrun

So what’s really hard?

  • Writing good code

  • Writing a good interface

  • Writing good docs

More with packages

Less with packages

Questions?

Write them in the Zoom chat, or as a comment in the course website, or as an issue in the course repository.

Time for a break! ☕

05:00