renv
renv: Project environments for R
renv helps you create reproducible environments for R projects by managing package dependencies. It ensures that each project has its own isolated library of packages with specific versions recorded in a lockfile.
renv solves the problem of projects breaking when packages are updated for other work by giving each project its own private package library. It makes projects portable across different computers and platforms by recording exact package versions in a lockfile that can be used to restore the same environment anywhere. The package uses a shared cache to make installing packages across multiple projects fast and efficient.
Contributors#
Events featuring renv#
Resources featuring renv#
Practical {renv} (Shannon Pileggi, The PCCTC) | posit::conf(2025)
Talk title: Practical {renv}
Speaker(s): Shannon Pileggi
Abstract:
The {renv} package aims to help users create reproducible environments for R projects. In theory, this is great! In practice, restoring a package environment can be a frustrating process due to overlooked R configuration requirements. Join me to better understand the source of environment restoration issues and learn strategies for successful maintenance of {renv}-backed projects.
Materials - https://github.com/shannonpileggi/practical-renv Example - https://github.com/shannonpileggi/jsonlite-example posit::conf(2025) Subscribe to posit::conf updates: https://posit.co/about/subscription-management/
R & Python playing nice, in Production (Claudia Penaloza, Continental Tires) | posit::conf(2025)
R & Python playing nice, in production
Speaker(s): Claudia Penaloza
Abstract:
Hi, I’m Claudia Peñaloza, a Data Scientist at Continental Tires, where going data-driven can be an adventure. What started as a proof of concept a few years ago, evolved into Conti’s first-ever Predictive Machine Learning Model for R&D! A baby, a wedding, two lateral moves, and three hires later, our team had also evolved… from mostly R to mostly Python developers. Rewriting 1000+ commits? No thanks. Instead, we got R and Python to play nice. With Renv, Poetry, and Docker, we keep things reproducible, portable, and deployable on various ML-Ops platforms. The takeaway? With the right tools, teams can mix and match languages, leveraging the best in each, and still build solid, scalable solutions. posit::conf(2025) Subscribe to posit::conf updates: https://posit.co/about/subscription-management/
Running unified attribution at scale | Martin Stein @ Conversion Logix | Data Science Hangout
Join us for a conversation with Martin Stein, Chief Analytics Officer at Conversion Logix, to chat about running unified attribution at scale, the tools they leverage, languages Conversion Logix’s uses, and the workflow and operations to make it all happen.
Featured Leader Bio: Martin Stein is a seasoned data scientist, entrepreneur, and Chief Analytics Officer at Conversion Logix. With over 20 years of experience in AI, machine learning, and data science, he brings a wealth of expertise to the multifamily industry, developing cutting-edge MarTech solutions that empower marketing leaders to make data-driven decisions to maximize their investments. Stein is also the co-founder of Bend.ai, an AI/machine learning company acquired by Conversion Logix. His career includes significant roles at Apple, IDG/IDC, G5, RStudio, and startups like FileThis, Defined.ai, and Union.ai. Throughout his career, he has demonstrated a proven ability to build and scale products to over $200 million in revenue.
Martin shares insights on topics like:
The problem with “last-touch” attribution in marketing and how his team is building solutions to provide a more comprehensive understanding of marketing channel effectiveness. Common data science struggles, including data access, data inconsistency, production challenges, and team dynamics. The value of community in a data scientist’s journey, particularly for those exploring new areas like AI. Tips for effectively communicating data science concepts and building business cases, both internally and with clients. Approaches to measuring channel success in marketing and comparing it to copy success, emphasizing the importance of considering factors beyond individual channel performance. How tools like Pins and Connect facilitate data management, workflow efficiency, and model deployment. Insights into the use of vetiver for model evaluation, highlighting its ability to assess model behavior with known and unknown data and its relevance to MLOps practices.
Don’t miss this insightful episode packed with practical advice and real-world examples for data scientists at all levels! A few people in the chat said it felt like they were listening to a really great mentor speak, and we agree ️
Resources mentioned in the episode and chat:
Causal Analysis: Impact Evaluation and Causal Machine Learning with Applications in R by Martin Huber https://mitpress.mit.edu/9780262545914/causal-analysis/ Causal Inference: The Mixtape by Scott Cunningham https://mixtape.scunning.com/ Kevin Ushey’s R Studio Conf talk on Renv https://www.youtube.com/watch?v=4wRiPG9LM3o Rami Krispin’s VS Code and R setup https://github.com/RamiKrispin/vscode-r
► Subscribe to Our Channel Here: https://bit.ly/2TzgcOu
Follow Us Here: Website: https://www.posit.co LinkedIn: (https://www.linkedin.com/company/posit-software ) Twitter: (https://x.com/posit_pbc )
To join future data science hangouts, add to your calendar here: pos.it/dsh (All are welcome! We’d love to see you!)
Thanks for hanging out with us!
R-Ladies Gaborone & R-Ladies RTP (English) - Personal R Administration
R-Ladies Gaborone and R-Ladies RTP co-host E. David Aja as he demonstrates tips, tricks, tweaks, and some hacks for building data science dev environments that you won’t be afraid to come back to in a year.
Slides link https://rstats-wtf.github.io/wtf-personal-radmin-slides/#/title-slide What They Forgot to Teach You About R https://rstats.wtf/
Speaker E. David Aja : https://www.linkedin.com/in/edavidaja/ R-Ladies Gaborone: https://www.meetup.com/rladies-gaborone/ R-Ladies RTP: https://www.meetup.com/r-ladies-rtp/
Extras#
Customising your .rprofile https://kanto.rbind.io/blog/customising-your-r-profile/
Locating R and R Adjacent Software and Configuration Files https://www.pipinghotdata.com/posts/2022-06-02-locating-r-and-r-adjacent-software-and-configuration-files/
CRAN-ial Expansion: Taking Your R Package Development to New Frontiers with R-Universe - posit::conf https://www.youtube.com/watch?v=XDiyAvpo2uk
You should be using renv | RStudio (2022) : https://www.youtube.com/watch?v=GwVx_pf2uz4
Featured music https://open.spotify.com/artist/0cmWgDlu9CwTgxPhf403hb
{slushy}: A Bridge to the Future - posit::conf(2023)
Presented by Becca Krouse
Scaling the use of R can present complications for environment management, especially in regulated industries with a focus on traceability. One solution is controlled (aka “frozen”) environments, which are carefully curated and tested by tech teams. However, the speed of R development means the environments quickly become outdated and users are unable to benefit from the latest advances. Enter {slushy}: a team-friendly tool powered by {renv} and Posit Package Manager. Users can quickly mimic a controlled environment, with the easy ability to time travel between snapshot dates. Attendees will learn how {slushy} bolstered our R adoption efforts, and how this strategy enables tech teams and users to work in parallel towards a common future.
Presented at Posit Conference, between Sept 19-20 2023, Learn more at posit.co/conference.#
Talk Track: Managing packages. Session Code: TALK-1078
Using R to develop production modeling workflows at Mayo Clinic - posit::conf(2023)
Presented by Brendan Broderick
Developing workflows that help train models and also help deploy them can be a difficult task. In this talk I will share some tools and workflow tips that I use to build production model pipelines using R. I will use a project of predicting patients who need specialized respiratory care after leaving the ICU as an example. I will show how to use the targets package to create a reproducible and easy to manage modeling and prediction pipeline, how to use the renv package to ensure a consistent environment for development and deployment, and how to use plumber, vetiver, and shiny applications to make the model accessible to care providers.
Presented at Posit Conference, between Sept 19-20 2023, Learn more at posit.co/conference.#
Talk Track: Leave it to the robots: automating your work. Session Code: TALK-1149
How to deploy a Shiny application using clinical trial data to Posit Connect
Episode 2: Publishing a Shiny application in R to Posit Connect - Using Clinical Trial Data Led by: Ryan Johnson, Data Science Advisor
Follow-up links:
- Posit Team: https://posit.co/products/enterprise/team/
- Talk to us directly: https://posit.co/schedule-a-call/?booking_calendar__c=RST_YT_Demo
- Follow-along blog post: https://posit.co/blog/publishing-a-shiny-app-in-r-with-clinical-trial-data-to-posit-connect/
- Source code for example: https://github.com/ryjohnson09/adam_analysis
- Posit Team demo resources: pos.it/demo-resources
Timestamps: 1:35 - High-level overview of Posit Team 3:30 - Overview of clinical trial data used 5:31 - Opening up RStudio session on Posit Workbench 7:51 - Creating a new directory in RStudio 9:16 - Upload the ADaM dataset to Posit Workbench 10:17 - Using packages from a validated repository on Posit Package Manager 12:37 - Install packages for your Shiny application 13:49 - Pasting the code for the Shiny application (https://github.com/ryjohnson09/adam_analysis ) 16:16 - Publishing your Shiny application to Posit Connect 18:36 - Changing access controls to published Shiny application 20:25 - Using renv to record your R environment
On the last Wednesday of every month, we host a Posit Team demo and Q&A session that is open to all. You can use this to add the event to your own calendar.
Who are these monthly demos for? Everyone is welcome to join us - regardless of industry, background, or experience!
We will discuss topics that will speak to:
- Data scientists and administrators new to Posit Team or are looking to grow their understanding of our toolchain,
- Teams searching for a new analytic platform built to support open-source data science,
- And, those that are just curious about Posit Team!
What you can expect from the monthly Posit Team demo:
During the session, we will walk through an end-to-end data science workflow and demo the core functionality of Posit Team while highlighting some of our latest features!
While each session’s content will vary slightly, here are a few core topics we will address each month:
- Open Source Analytics: The future of data science is open source. We’ll discuss methods for leveraging open-source tools and packages in a secure and scalable way!
- Deployment: How to share the amazing data science assets your Team has built, including web applications, machine learning models, APIs, and more!
- Data Access: Data comes in various forms and is stored in various ways. We’ll discuss best practices for accessing, reading, and writing data!
- Job Scheduling: Do you have recurring data science jobs? We’ll show you how to automate these processes using Posit Connect.
What is Posit Team?
Posit Team is a bundle of our popular professional software (Posit Workbench, Posit Connect, and Posit Package Manager) for developing data science projects, publishing data products, and managing packages.
Registration is not required. The event will be streamed through YouTube Premiere
With a little help from my friends: Tools for developing & deploying algorithms in the hospital
The Data Science and Advanced Analytics (DSAA) team at Unity Health Toronto has successfully deployed prediction models to the hospital. This would not have been possible without trial-and-error, open source tools, and help from our friends at Posit. In this talk, we will share the various tools and approaches used to develop and deploy an early warning system in the hospital.
Speaker bio: Chloé Pou-Prom is a data scientist with the Data Science and Advanced Analytics (DSAA) team at Unity Health Toronto. The DSAA team uses high quality healthcare data in innovative ways to catalyze communities of data users and decision makers in making transformative changes that improve patient outcomes and healthcare system efficiency.
Timestamps: 2:37 - Start of presentation 4:41 - Projects their team works on 7:39 - Team is split into 4 teams (data integration & governance, advanced analytics, product development, and support) 8:00 - Successful deployment example (CHARTwatch - early warning systems for detecting patient deterioration) 12:09 - How this was running before (one person’s laptop, no logging, no dev environment) 13:23 - Moving from before to now - What do you need for development? 13:40 - Connections to databases 16:25 - Reproducible environment 17:50 - Package based development 19:30 - Dev, staging, production environments 20:24 - What do you need for deployment? 30:21 - end of fire alarm break :) 33:07 - Authentication with Posit Connect (with hospitals Active Directory) 34:30 - Scheduling scripts on Posit Connect 35:35 - Receiving alerts when there’s downtime (internal package for monitoring applications) 38:07 - Using internally developed packages with Posit Package Manager 40:58 - Implementation plan 49:29 - Monitoring 54:25 - Summary of development and deployment tools needed 56:12 - Start of Q&A
Helpful resources: ⬢ Slides: https://lnkd.in/ePEH5k6Z
Tools for Development: ⬢ Database connections [https://lnkd.in/eFDHR4cF] ⬢ Reproducible environment that lets multiple people collaborate on a project: [Renv: https://lnkd.in/e_DHddeA] ⬢ Package-based development [Functions and utilities that you re-use: https://r-pkgs.org/] ⬢ development, staging, production environments [https://lnkd.in/ezczn2Zz]
Tools for Deployment ⬢ Authentication: [Posit Connect: https://docs.posit.co/rsc/ ] ⬢ Downtime protocols ⬢ A secure way to download internally-developed packages [Posit Package Manager: https://docs.posit.co/rpm/] ⬢ Implementation plan ⬢ Monitoring [“Monitoring Model Performance”: https://lnkd.in/eSUgRYNM & “MLOps with vetiver in Python and R”: https://lnkd.in/efN4vcrg]
About Data Science and Advanced Analytics at Unity Health Toronto: ⬢ https://unitynet.unity.local/departments-programs-services/corporate-services/data-science-and-advanced-analytics/
About CHARTwatch ⬢ “Preparing a Clinical Support Model for Silent Mode in General Internal Medicine”: https://lnkd.in/eJAWmYWk ⬢ “Implementing Machine Learning in Medicine”: https://lnkd.in/eFesPijY ⬢ “From Compute to Care: Lessons Learned from Deploying an Early Warning System into Clinical Practice”: https://lnkd.in/e-D7aDDf
Want to join us at a future event? pos.it/community-events
Zhian N. Kamvar | Building Accessible Lessons with R and Friends | RStudio (2022)
The Carpentries is a global community of volunteers who collaboratively develop and deliver lessons to build capacity in data and coding skills to researchers worldwide. In the recent redesign of our lesson infrastructure (serving more than100 lessons, used daily by more than 5K learners), we replaced embedded Jekyll templates with a workbench of modular and accessible packages using R and Pandoc. By leveraging renv and knitr for R-based lessons, we provide a seamless and collaborative lesson development experience that maximizes reproducibility and minimizes frustration so authors can focus on the contents, not the tooling. We demonstrate how anyone can use our infrastructure to build customised and accessible sites for their own lessons or tutorials.
Talk materials are available at https://github.com/zkamvar/rstudio-conf-2022
Session: It takes a village: building communities of practice