R in 3 Months Week 13 (Wrapping Up)

Agenda

  1. How Far You’ve Come

  2. Where to Go From Here

  3. How to Ask Good (Code) Questions

  4. Wrapping Up

How Far You’ve Come

Data Analysis

Data Visualization

How Scared/Excited You Are About R

What You’ve Done in the Last Three Months

Where to Go From Here

Rubber Duck Debugging

The power of talking through your code problems 🦆 💬

  • It doesn’t have to be a duck

  • Walk through as if the “duck” has no context

Planning with Pseudo Code

  • Use plain language before you code (sometimes this means starting by the end)

  • Get to know your subject qualitatively

  • Refine your analysis questions

Break it down!

  • Split your code into multiple R scripts by themes and outputs

  • Save functions in separate R scripts

  • Bring to your Quarto document only what you need

Where to Ask Questions

There are two popular question and answer communities for (R) code questions:

Posit Community

  • This community is run by Posit and is specifically for R users

  • The admins do work to make the site a welcoming place for all users

Data Science Learning Community

  • Slack community that is very welcoming to newbies

  • Has regular office hours where you can get 1-on-1 help

Bonus: R-Ladies

  • “A worldwide organization whose mission is to promote gender diversity in the R community”

  • Extremely welcoming

  • Have local chapters that often host events, and many are online

Bonus: Social Media

Bonus: Conferences

Bonus: ChatGPT + other AI tools

  • The more you can specify the package you want it to use, the better results you’ll have

How to Ask Good (Code) Questions

How to Ask Good (Code) Questions

The most important part of asking good questions about code is to provide reproducible examples.

A reproducible example contains all necessary code to reproduce your error or to customise your chart.

The reprex package is designed to help guarantee your examples are reproducible.

Examples are Minimal

In addition to making your code reproducible you should try to make it minimal.

Use the smallest, simplest, most built-in data possible.

Think: iris or mtcars. Bore me.

Make your question as focused as possible

Example of a Good Reprex

How can I reorder bars on the y axis?

Using the reprex Package

  1. Select the code that makes your reprex

  2. Open the Addins menu and select “Render reprex…”

  3. Choose the options for where you’re asking your question

  4. Copy and paste the output in the Viewer tab into your question

Learn More About Reprex

Wrapping Up

R in 3 Months

  1. Submit any assignments for feedback any time in June

  2. Any 1-on-1s with Gracielle must be completed by end of June

  3. Please submit final assignments whenever (we love seeing what you’ve done!)

  4. You have access to course materials FOREVER

Other Things

  1. Topics courses (use coupon code RIN3TOPICSCOURSES to get 25% off)

  2. Everyone has access to Using Git and GitHub with R

  3. Additional ways that R for the Rest of Us can help you and your organization

Thank You for Being Part of R in 3 Months!