R6 provides encapsulated object-oriented programming for R with reference semantics. It’s a simpler, faster, and lighter-weight alternative to R’s built-in reference classes for classical object-oriented programming.
R6 classes support public and private members, clean inheritance across packages, and don’t depend on S4 or the methods package. This makes them more portable and easier to work with than reference classes. The package offers better performance while maintaining the key benefits of reference semantics for building class-based systems.
Contributors#
Resources featuring R6#
It’s all fun and games til your analysis code is finished (Alex Rossell Hayes) | posit::conf(2025)
It’s all fun and games til your analysis code is finished: the player package in R Speaker(s): Alex Rossell Hayes
Abstract: The player package is a set of games built entirely in R that you can play in the R console. This lighthearted, humor-filled talk will introduce the package and demo some of its games, including opportunities for audience participation. If selected for a full talk, this will also include a demonstration of how the package code comes together, including approachable introductions to concepts like object-oriented programming with R6 and message handling with cli. The talk will show how playing around with R can be one of the best ways to learn new techniques (some of which can even be carried over into more serious programming).
player repo: https://github.com/rossellhayes/player posit::conf(2025) Subscribe to posit::conf updates: https://posit.co/about/subscription-management/
{mirai} and {crew}: next-generation async to supercharge {promises}, Plumber, Shiny, and {targets}
{mirai} is a minimalist, futuristic, and reliable way to parallelise computations – either on the local machine, or across the network. It combines the latest scheduling technologies with fast, secure connection types. With built-in integration to {promises}, {mirai} provides a simple and efficient asynchronous back-end for Shiny and Plumber apps. The {crew} package extends {mirai} to batch computing environments for massively parallel statistical pipelines, e.g. Bayesian modeling, simulations, and machine learning. It consolidates tasks in a central {R6} controller, auto-scales workers, and helps users create plug-ins for platforms like SLURM and AWS Batch. It is the new workhorse powering high-performance computing in {targets}.
Talk by Charlie Gao and Will Landau
Slides: https://wlandau.github.io/posit2024
GitHub Repo: https://github.com/wlandau/posit2024
mirai: https://shikokuchuo.net/mirai/
crew: https://wlandau.github.io/crew/

Olga Mierzwa-Sulima | Best Practices for Developing Shiny Apps | RStudio
From rstudio::global(2021) Shiny X-Sessions, sponsored by Appsilon: Best practices for developing Shiny apps presentation covers organizing app’s code with modules and R6 classes, setting up development environment, and testing.
About Olga Mierzwa-Sulima: Olga is experienced in production applications of analytical solutions, especially for FMCG companies. Recently she developed a price elasticity model for Unilever.
Learn more about the rstudio::global(2021) X-Sessions: https://blog.rstudio.com/2021/01/11/x-sessions-at-rstudio-global/

