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?

Planner

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

Travis, 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?

Pre-commit

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

Illustration by Mara Averick

Pre-commit

precommit R package – Python precommit framework

  • Setup hooks

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

Pre-commit

๐Ÿคซ 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.

Interesting for authors, and reviewers!

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

rOpenSci Software Peer Review

๐Ÿš€ Even more review and best practice on the way! rOpenSci Statistical Software Peer Review

Other venues

See also JOSS, R Journal, JSS.

Questions?

Write them in the shared doc.

Time for a break! ๐Ÿต

05:00