How Far You’ve Come
Where to Go From Here
How to Ask Good (Code) Questions
Wrapping Up
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
Use plain language before you code (sometimes this means starting by the end)
Get to know your subject qualitatively
Refine your analysis questions
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
There are two popular question and answer communities for (R) code questions:
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
Slack community that is very welcoming to newbies
Has regular office hours where you can get 1-on-1 help
“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
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.
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
How can I reorder bars on the y axis?
reprex
PackageSelect the code that makes your reprex
Open the Addins menu and select “Render reprex…”
Choose the options for where you’re asking your question
Copy and paste the output in the Viewer tab into your question
Submit any assignments for feedback any time in June
Any 1-on-1s with Gracielle must be completed by end of June
Please submit final assignments whenever (we love seeing what you’ve done!)
You have access to course materials FOREVER
Topics courses (use coupon code RIN3TOPICSCOURSES to get 25% off)
Everyone has access to Using Git and GitHub with R
Additional ways that R for the Rest of Us can help you and your organization