Find your way in the R world

Maëlle Salmon 🏠 https://masalmon.eu 🐦 ma_salmon

Licence CC-BY-SA

👋 Hello from Nancy !

Picture by Ann H on Pexels.

Picture by Ann H on Pexels.

My R journey

BSc in biology, first steps in R, ⚡ really liked R Graph Gallery!

MSc ecology, MPH. Many scripts.

PhD in statistics. Contributions to a package! SVN, R-Forge, manually created Rd, Sweave.

Statistician and data manager. Use of devtools, tidyverse, R Markdown, git, GitHub.

At the same time as discovering devtools &co : Twitter, R blog, package submission to rOpenSci, co-founded R-Ladies Barcelona.

Recent projects

Research software engineer for rOpenSci, e.g. maintaining the package dev guide. 🔧 rOpenSci at useR! https://ropensci.org/blog/2021/07/02/ropensci-user2021/

Some work on the next version of pkgdown. ✨

Online book “HTTP testing in R” with Scott Chamberlain. 📖

Volunteering in the R community

Main manager of the Twitter account of R-Ladies Global. 🐦

Editor for rOpenSci Software Peer Review. 📦

Various talks sharing tips & tricks. 😉

Slidedeck online 😁

🔗 https://r-way.netlify.app/

Two categories of tips today!

Why & how to follow R news.

How & where to get help with R.

Why follow R news ?

Improve your current work. Example : rex !

Solve your future problems. Example : knowing reticulate exists.

Picture by Andrea Piacquadio on Pexels.

Picture by Andrea Piacquadio on Pexels.

How does following news help ?

Learn about tools,

Learn about organizations and people.

Picture by Olya Kobruseva on Pexels.

Picture by Olya Kobruseva on Pexels.

Infinite information flows

Twitter #rstats hashtag, Twitter timeline.

GitHub timeline.

Hard to optimize.

Picture by Quang Nguyen Vinh on Pexels.

Picture by Quang Nguyen Vinh on Pexels.

Infinite information flows

😌 Don’t be a completist.

✂️ Mute; optimize with Tweetdeck (even regular expressions!) and RefinedGitHub ?

✨ Follow accounts useful for you.

📖 Read Twitter for R programmers.

🤷 And if it doesn’t suit you, don’t use them! Maybe just a Twitter account indicating your homepage?

News aggregators

Picture by cottonbro on Pexels.

Picture by cottonbro on Pexels.

Your collection ?

RSS feeds of your favorite blogs! Included blogs of tools you use.

Conferences

Picture by Pixabay on Pexels.

Picture by Pixabay on Pexels.

R Conferences

R Conferences

Attend or…

Use online materials (many things these days 😬);

  • Read schedules;

  • Read slidedecks;

  • Watch recordings.

R Conferences, when, where ?

R Weekly conferences section 🚀

Picture by Olya Kobruseva on Pexels.

Picture by Olya Kobruseva on Pexels.

Why not read books?

Big Book of R, collection of links to R books, many of them available for free online!

Pick recent ones.

Picture by Min An on Pexels.

Picture by Min An on Pexels.

Why not read books?

Last super useful R book I read : R Markdown Cookbook by Yihui Xie, Christophe Dervieux, Emily Riederer.

Discuss

With your colleagues and R friends.

At conferences. 😁

Picture by Christina Morillo on Pexels.

Picture by Christina Morillo on Pexels.

No news overdose

Keeping up-to-date is not following everything live!

No need to read everything.

Every piece of code written in a given language or framework is a step away from any other language, and five more minutes you’ll have to spend migrating it to something else. That’s fine. You just have to decide what you’re willing to be locked into.

Quote by Vicki Boykis “Commit to your lock-in”. Get to work, with your maybe imperfect tools.

What to do with information?

Evaluate it!

  • Like all information. 😁

  • Ask your R friends for opinion.

For packages there are useful criteria.

Evaluation criteria for packages.

  • Active development ?

  • Well tested ?

  • Well documented ?

  • Popular ?

  • Developed by someone / an organization you already trust ?

Guidance for package development

Picture by Tiger Lily on Pexels.

Picture by Tiger Lily on Pexels.

rOpenSci dev guide

Tidyverse design guide

Solving your problems

Picture by Andrea Piacquadio on Pexels.

Picture by Andrea Piacquadio on Pexels.

My typology of R questions

Problem! Bug! Error!

Question/debate (is there an R tool for foo? How do I learn bar? ggplot2 or base plots?)

First, how to solve your problems.

Asking for help?

After reasonable efforts.

🔍 Re-read the docs ;

🔍 Use a search engine ;

🔍 Experimenting.

Note

Turn it off and on again !

This and other excellent advice in a talk by Jenny Bryan “Object of type ‘closure’ is not subsettable”.

Don’t only turn off your computer!

Small bingo

Search engine

According to http://datacarpentry.org/semester-biology/materials/googling-for-help/

  • Choose words well (Ah ! So easy…)
  • Not too many words
  • Specify R

Evaluate credibility of results (site, authors, date, scores, etc.)

Get to know reprex

Goal: from a bug in a script to the tiniest example possible.

reprex by Jenny Bryan & its docs

  • A concept, reprex for “reproducible example.”

  • An excellent package for running code in a isolated playground & communicating it.

Why reprex ?

  • The isolated bug is easier to solve or will be solved by creating it !

  • You can send your bug in a format ideal for experts !

How does reprex work

  • You write some code somewhere (including loading libraries, creating toy data etc.).
  • You copy the code to your clipboard.
  • You run reprex::reprex()
  • You get the rendered code on the clipboard (and a preview in RStudio Viewer pane)! Error messages rendered, images uploaded to imgur.
  • You paste the rendered code somewhere to show to someone.

More info on reprex &co

More debugging resources

💣 “debugging” in Advanced R de Hadley Wickham

💣 Webinar “Debugging techniques in RStudio” by Amanda Gadrow

And if it still does not work?

Give up 😭 or ask for help !

Picture by Pixabay on Pexels.

Picture by Pixabay on Pexels.

Where to ask for help?

The ideal place depends on:

  • your confidence level;

  • your question.

Picture by Sound On on Pexels.

Picture by Sound On on Pexels.

Safest places

Your colleagues and friends. But also…

Public Q&A places 1/2

Twitter #rstats. Short questions or links to longer questions.

Picture by Marcus Aurelius on Pexels.

Picture by Marcus Aurelius on Pexels.

Publics Q&A places 2/2

Packages. Where to report a bug? Look in docs and search engine.

Stack Overflow. Bugs and short questions.

Picture by Polina Zimmerman on Pexels.

Picture by Polina Zimmerman on Pexels.

Where to ask for help?

You might have to ask in several places (one after the other).

Picture by Yan Krukov on Pexels.

Picture by Yan Krukov on Pexels.

Conclusion

Thanks !

To Batool Almarzouq and all useR! organizers, and to y’all for listening!

Picture by Ann H on Pexels.

Picture by Ann H on Pexels.

Progress, not pressure

Regular learning, slow but steady usage of reprex…

Picture by Andrea Piacquadio on Pexels.

Picture by Andrea Piacquadio on Pexels.

Help others

  • Developers, write good docs & changelogs.

  • Share new-to-you useful information!

  • Answer others’ questions. It helps you too!

Picture by Armin Rimoldi on Pexels.

Picture by Armin Rimoldi on Pexels.

🔗 https://r-way.netlify.app/

To find your way in the R world…

  • Follow R news as you prefer,

  • Learn to solve your problems and to ask for help.

Find your community. ✨

Picture by Pixabay on Pexels.

Picture by Pixabay on Pexels.