How to improve your R package

Automatically ✨, and not 🧠

Workflow automation tools


Assessing your package

Improve metrics by hand?!

Yes and no!

Gloves on dish rac

Picture by Lisa Fotios

Tools for improving

When and where to use the tools?

Right after my talk (not now 😜), but then?


Picture by Bich Tran

Continuous integration

Run something every time you make a change

“The idea behind continuous integration is that CI will automatically run R CMD check (along with your tests, etc.) every time you push a commit to GitHub. You don’t have to remember to do this; CI automatically checks the code after every commit.” Julia Silge

GitHub Actions, Circle CI, tic package

Continuous integration

How to learn?

Julia Silge’s post - Jim Hester’s GitHub Actions talk - usethis helpers

More with continuous integration

Couple a thing (R CMD check? pkgdown site building?) to

… each commit,

… every Monday,

… applying a label to a pull request?


Tired: Always remember to do things well. Wired: Use continuous integration to notice wrong stuff

Illustration by Mara Averick


precommit R package – Python precommit framework

  • Setup hooks

  • Hooks for styling, parsable R code, spell checks, etc.


🤫 You can still skip the checks.

Check things before show time

CRAN release! 🐉 Checks on different platforms, URLs, spell checks…

Improve workflow vs. procrastinate

Risk of spending too much time on meta-work.

As a beginner, easier to create good habits. 😉

Stop sign with photoshoped street names: 'Homework Ave' and 'Procrastination Pk'.

Picture by Pedro da Silva

Reading code & about code

Why read source code

  • You want to know what is going on.

  • You want to build on the function/package for your own goals.

  • You’re just curious.

  • You need examples of a thing in the wild.

How to read source code

Reading code…

And trying things out!

Fork, clone, and explore!

Podcast episode “Learning a new codebase”, with Patricia Aas

Read blogs and fora

Blog posts: digested information.

Read blogs and fora

Fora: Help and learn.

R-package-devel, RStudio community “package development” category, rOpenSci forum.

💡 Manage your subscriptions & involvement wisely!

rOpenSci Software Peer Review

Transparent, constructive, non adversarial and open review process for packages in scope.

Also rOpenSci Statistical Software Peer Review.

Interesting for authors, and reviewers!

Online book of best practice for the reviews and package development.

Other venues

See also JOSS, R Journal, JSS.


Write them in the shared doc.

Time for a break! 🍵