By Cecilia Baldoni & Corné de Groot | April 15, 2025
The Member Engagement Committee runs Code Club every third Tuesday of the month. Time can vary depending on the host and will be announced at least two weeks in advance on SORTEE’s Slack. For more information, see SORTEE’s Code Club page.
On April 15th, we explored what it means to create a reproducible coding environment in R. There were 11 participants at this month’s session, and it was a very lively discussion! We started with a fun icebreaker: “Did you ever have one of those days where everything that could go wrong, went wrong?” 50% said “Maybe once… maybe not,” and the other 50% were firmly in the “Oh, hell yeah” camp (You’re in good company.)
The session covered simple strategies to make code easier to rerun, share, and understand. We discussed how tools like R Projects, the “renv” package, and Rig can help us track package versions, organise our folders, and manage different R versions across systems. The focus wasn’t on doing everything perfectly but on building good habits that can make our work more reliable in the long run.
You can find the slides with clickable links to all tools and resources here!
Take-home messages:
- R Projects are a great place to start Just by starting your analysis in an R Project, you avoid a lot of file path chaos and get a clean working directory. It’s one of the easiest ways to boost reproducibility without changing anything else.
- Use renv and Rig to freeze your setup
renv saves the packages you’re using and their exact versions. Rig lets you switch between different R versions. Together, they make sure your code still works tomorrow—or on someone else’s computer. Some participants shared their workflows and preferred resources too, including
groundhog
,target
andDocker
.
What’s next?
The next Code Club meeting will be on Tuesday, May 20th at 07:00 UTC (zoom link will be posted on SORTEE’s Slack).
You can check the Code Club schedule here for upcoming meetings.
To receive calendar invites in your local time zone, sign up here.
Suggest a topic
To propose a Code Club meeting topic, please use this form.