+ - 0:00:00
Notes for current slide
Notes for next slide

How to improve your R package

Automatically ✨, and not 🧠

MaΓ«lle Salmon – e-Rum 2020

tiny.cc/erum2020

masalmon.eu

ma_salmon

maelle

icon0.com on Pexels

1 / 23

Ciao!

  • Work: rOpenSci, R-hub (πŸ™ R Consortium)

  • Volunteering: rOpenSci, R-Ladies, R Weekly

2 / 23

Developing packages is great

  • For (future) you,

  • The collaborators you know,

  • And the collaborators you don't.

    Person putting a pink ribbon on a gift package

Picture by cottonbro

3 / 23

Package development from 0 to hero?

Easier with modern tools.

Online tutorials, R packages book by Hadley Wickham and Jenny Bryan.

... Now what?!

4 / 23

Package development from 0 to hero?

Easier with modern tools.

Online tutorials, R packages book by Hadley Wickham and Jenny Bryan.

... Now what?!

  • Automatic tools & how to use them;

  • Making the most of information out there.

Pick one or a few tip(s)!

4 / 23

Workflow automation tools

cottonbro on Pexels

5 / 23

Assessing your package

6 / 23

Assessing your package

6 / 23

Assessing your package

6 / 23

Improve metrics by hand?!

Yes and no!

Gloves on dish rack

Picture by Lisa Fotios

7 / 23

Tools for improving

8 / 23

Tools for improving

8 / 23

Tools for improving

8 / 23

Tools for improving

8 / 23

Tools for improving

8 / 23

When and where to use the tools?

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

Planner

Picture by Bich Tran

9 / 23

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...

10 / 23

Continuous integration

How to learn?

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

11 / 23

Continuous integration

How to learn?

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

11 / 23

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?

12 / 23

Pre-commit

Tired: Always remember to do things well. Wired: Use continuous integration to notice wrong stuff
. Inspired: Use precommit to not even commit wrong stuff

Illustration by Mara Averick

13 / 23

Pre-commit

precommit R package -- Python precommit framework

  • Setup hooks

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

    Purple crochet hook

Picture by Castorly Stock

14 / 23

Check things before show time

15 / 23

Check things before show time

CRAN release! πŸ‰ Checks on different platforms, URLs, spell checks...

15 / 23

Improve workflow vs. procrastinate

Risk of spending too much time on meta-work.

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

Picture by Pedro da Silva

16 / 23

Reading code & about code

cottonbro on Pexels

17 / 23

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.

18 / 23

How to read source code

Picture by Sereja Ris

19 / 23

Reading code...

And trying things out!

Fork, clone, and explore!

Podcast episode "Learning a new codebase", with Patricia Aas

Kitten touching a plant

Picture by Dimitri Houtteman

20 / 23

Read blogs and fora

Blog posts: digested information.

21 / 23

Read blogs and fora

Blog posts: digested information.

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

21 / 23

Read blogs and fora

Blog posts: digested information.

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

πŸ’‘ Manage your subscriptions & involvement wisely!

21 / 23

rOpenSci Software Peer Review

22 / 23

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.

22 / 23

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.

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

22 / 23

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.

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

See also JOSS, R Journal, JSS.

22 / 23

How to improve your package

Automatically ✨, and not 🧠

tiny.cc/erum2020

πŸ—’οΈ R-hub resources: Workflow automation tools for package developers (blog post) - Read the R source! (blog post) - R-hub docs.

πŸ—’οΈ rOpenSci resources: rOpenSci Software Peer Review - rOpenSci dev guide - rOpenSci Statistical Software Peer Review.

23 / 23

Ciao!

  • Work: rOpenSci, R-hub (πŸ™ R Consortium)

  • Volunteering: rOpenSci, R-Ladies, R Weekly

2 / 23
Paused

Help

Keyboard shortcuts

↑, ←, Pg Up, k Go to previous slide
↓, β†’, Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow