Build pipeline automation in R with the targets package: controllers, branching, error strategies, watch mode, renv snapshots, and CI runs.
Guides
Guides
In-depth guides for R developers.
- Pipeline Automation with targets
- R Docker: reproducible R environments with Rocker
R Docker setup with the Rocker image stack: package, share, and deploy R projects reproducibly, from scripts to Plumber APIs and Shiny apps.
- REST APIs with plumber
Build HTTP APIs in R with plumber. Covers decorators, dynamic routes, serializers, filters, and a working plumber.R you can hit with curl.
- Advanced R Markdown: from templates to Pandoc
Parameterized reports, chunk hooks, caching strategies, Lua filters, and Pandoc customization for R Markdown users past the basics.
- Quarto Documents in R: Structure and Rendering
Quarto documents in R combine prose, code, and metadata in one .qmd file. Learn YAML, code cells, #| options, inline R, and output formats.
- Arrow Big Data in R: Datasets, Partitioning, and S3
Arrow big data in R: use the arrow Datasets API to query partitioned Parquet, push down filters and projections, and read from S3 and GCS with dplyr.
- data.table R Guide: fread, Joins, and In-Place Updates
Master data.table R: fread and fwrite, keys and secondary indices, rolling and non-equi joins, .SD and .SDcols, and in-place := updates.
- Object-Oriented Programming with R6
Build encapsulated R6 classes in R with reference semantics, private fields, active bindings, inheritance, and method chaining.
- R and Python Interop with reticulate
Call Python from R and round-trip data frames, arrays, and functions with reticulate — setup, type conversion, and gotchas.
- Interactive ggplot with ggiraph
Create interactive ggplot charts with ggiraph: add tooltips, hover effects, and click selection to any ggplot2 plot for Shiny apps and R Markdown.
- Rcpp C++ Integration in R: Speed Up Your R Code with C++
Learn Rcpp C++ integration in R: write fast C++ functions with sourceCpp, benchmark R vs compiled code, and build R packages with C++ extensions.
- Advanced Table Formatting with gt
Master table formatting in R with the gt package. Create presentation-ready display tables with custom styling, conditional formatting, and row groups.
- Calling Python from R with reticulate
Learn how to use Python libraries directly inside R using the reticulate package, with clear examples and common pitfalls explained.
- Benchmarking R Code — Learn to measure and compare R code
Learn to measure and compare R code performance with the microbenchmark package. Includes practical examples comparing base R, dplyr, and data.table.
- Modular R Code with box — A Modern Module System
Learn modular R programming with the box package — maintainable code using local modules, explicit imports, and nested directories, no formal packages.
- Building CLI Tools in R: A Practical Guide
Building CLI tools in R: master argparse, optparse, shebangs, and executable scripts for creating command-line interfaces and automating data pipelines.
- Measuring Test Coverage in R Packages with covr
Measuring test coverage in your R packages with covr. Learn to track coverage, generate reports, exclude code, and integrate with CI/CD pipelines.
- Async R with future and promises
Master async R programming with the future and promises packages; run parallel background computations without blocking your main R session.
- Code Quality with lintr and styler
Learn how to use lintr for static code analysis and styler for automatic code formatting in R. Improve your package code quality with these essential tools.
- Package Documentation Sites with pkgdown
Create professional package documentation sites for your R packages with pkgdown: setup, configuration, and automated deployment via GitHub Pages.
- Testing R Code with testthat: A Complete Guide
Comprehensive guide to testing R code with testthat: write unit tests for packages, use expectations, structure test files, and integrate with CI/CD.
- Programming with Tidy Evaluation in R
Write reusable R functions with tidy evaluation using quasiquotation operators like !!, !!!, and the {{ }} syntax for dynamic column handling.
- Working REST APIs with httr2 in R
Working REST APIs in R: learn HTTP requests, authentication, JSON parsing, retry logic, and building reliable data pipelines with httr2.
- dtplyr dplyr to data.table Translation Guide
dtplyr dplyr translation runs your tidyverse code as fast data.table operations. Learn how dtplyr bridges dplyr and data.table for large-data workflows.
- Database Queries in R with dbplyr and dplyr
Run database queries from R with dbplyr, which translates dplyr verbs into SQL. Work with remote databases through familiar tidyverse syntax.
- Keras R: Build Deep Learning Models with TensorFlow in R
The Keras R package brings TensorFlow deep learning to R. Build and train neural networks with Sequential and Functional APIs, then deploy to mobile or web.
- Sharing Data Artifacts with pins
A guide to sharing data artifacts across R projects with the pins package: pin objects to boards for discoverable, versioned, reproducible data management.
- Deep Learning with torch for R
Learn to use the torch package for deep learning in R. Covers tensors, neural networks, training loops, and GPU acceleration.
- Model Deployment with Vetiver in R
Deploy ML models as Plumber APIs with vetiver. Covers model deployment with versioning via pins, model cards, and serving predictions via HTTP.
- Build an Interactive Map with leaflet
Create a production-ready interactive map in R using leaflet. Learn to add markers, popups, layers, and custom styling.
- Publication-Ready Charts with ggplot2
Learn to create professional, publication-quality charts with ggplot2. Master custom themes, fonts, color palettes, and export settings.
- Sending Emails from R with blastula: Complete Guide
Sending emails from R with blastula: SMTP setup, HTML and plain text composition, attachments, inline images, and programmatic sending with error handling.
- Build an Animated Chart with gganimate
Learn to create stunning data animations in R using gganimate. This hands-on project walks you through building engaging animated visualizations.
- Build an R Package from Scratch
Learn how to create a complete R package from scratch. Covers package structure, functions, documentation, dependencies, and publishing to CRAN.
- Build CRUD APIs with R Plumber and SQLite
Learn to build CRUD REST APIs in R with plumber and SQLite. Create, read, update, and delete records through HTTP endpoints backed by a persistent database.
- Build a Data Portfolio with Quarto
Create a stunning data portfolio website to showcase your R projects, analyses, and visualizations. Learn how to structure, style, and publish your work.
- Build a Data Explorer Shiny App
Create an interactive data explorer in R with Shiny. Let users upload CSV files, filter dynamically, and visualize results with tables and plots.
- Build a Sales Dashboard with Shiny
Learn to create an interactive sales dashboard in R using Shiny. Track KPIs, visualize trends, and let users filter data by date, category, and region.
- How to Build Simple R Packages: A Step-by-Step Guide
Learn to build simple R packages in 30 minutes: the fastest path to creating, documenting, and sharing your own R package with devtools, usethis, and roxygen2.
- How to Build Web Scrapers with rvest
Learn to build web scrapers in R with rvest: handle multiple pages, respect rate limits, parse HTML with CSS selectors, and save structured data.
- Reproducible Analysis Reports with Quarto
Learn how to create polished, reproducible analysis reports using Quarto with R. From setup to publication, this guide covers everything you need.
- Bayesian Modelling with rstanarm
Learn Bayesian statistics with rstanarm - from priors to posterior interpretation. Bayesian statistics offers a different way to think about data analysis.
- R Environments and Scoping: A Practical Guide
R environments and scoping explained: how the parent chain drives lexical lookup, with closures, the search path, and active bindings in R 4.x.
- Functional Programming in R
Learn functional programming paradigms in R: first-class functions, higher-order functions, closures, and function factories.
- ggplot2 Extensions: patchwork, ggrepel, gganimate
Learn how to extend ggplot2 with powerful extensions for combining plots, labeling points, and creating animations.
- Running R in GitHub Actions
Learn how to automate R workflows with GitHub Actions—CI/CD for R packages, testing, pkgdown sites, and more. The standard way to validate an R package is .
- Generalised Linear Models in R
Learn how to fit and interpret Generalised Linear Models (GLMs) in R for binary, count, and categorical outcomes.
- Publication-Ready Tables with gt
Create publication-ready tables with the gt package in R. A complete guide to styling, formatting, footnotes, and exporting professional tables.
- Non-Standard Evaluation (NSE) in R
Learn how R's non-standard evaluation works, how to capture unevaluated expressions, and when to use NSE in your own functions.
- Object-Oriented R with R6
Learn to build reliable object-oriented systems in R using the R6 class system for encapsulated, mutable objects.
- Parallel purrr with furrr: Speed Up R Iterations
Learn parallel purrr with furrr to speed up R iterations. Replace map() with future_map() using the future backend for major performance gains.
- Interactive Visualizations with plotly
Build interactive visualizations in R with plotly — create interactive charts, 3D plots, and dashboards using both plot_ly() and ggplotly().
- Reading Excel Files with readxl and writexl
Learn how to read and write Excel files in R using the readxl and writexl packages. Excel workbooks often contain multiple sheets.
- Interactive Tables with reactable
Create interactive tables with reactable in R. Learn sorting, filtering, pagination, and custom cell rendering for responsive data tables.
- Survival Analysis in R
Learn how to perform survival analysis in R using the survival package. Covers Kaplan-Meier curves, Cox regression, and survminer visualizations.
- R Metaprogramming with rlang: Tidy Evaluation and DSLs
Master R metaprogramming with rlang. Covers tidy evaluation, quosures, symbols, and building domain-specific languages for advanced R package development.
- Time Series Forecasting with fable
Learn how to forecast time series data in R using the fable package - from data preparation to model evaluation.
- Working with JSON in R
Learn how to read, write, and manipulate JSON data in R using jsonlite and other packages. Use to convert single-element arrays to raw types.
- Advanced Web Scraping with rvest and polite
Learn how to scrape websites responsibly using R packages rvest and polite. Covers HTML parsing, form handling, pagination, and error management.
- High-Performance Vectors with vctrs
Master the vctrs package for type-safe, high-performance vector operations in R. Learn vec_size, vec_cast, and the new vctr class.
- Writing R Packages with devtools
Learn how to create, test, and distribute R packages using the devtools workflow. The examples assume R 4.0+ and current versions of devtools dependencies.
- Base R Plotting: Scatter, Line, Bar, and Box Plots
Learn base R plotting with plot(), hist(), barplot(), and boxplot(). Covers scatter, line, bar, and box charts with full customization.
- Creating Documents with Quarto
Creating documents with Quarto, the next-generation publishing system. Learn to build professional reports, presentations, and websites from R and Python code.
- Working Parquet Files in R with the Arrow Package
Working Parquet files in R with the Arrow package: learn to read, write, compress, and query columnar data for faster analytics with smaller storage.
- Fast Data Manipulation with data.table
Fast data manipulation with data.table in R. Master the concise i-j-by syntax for high-performance filtering, grouping, and in-place column operations.
- R Databases with DBI: Connect to SQLite, PostgreSQL, MySQL
R databases connecting with DBI, a unified interface for SQLite, PostgreSQL, MySQL, and more. Write database-agnostic R code that works across backends.
- Dates and Times with lubridate
A beginner-friendly guide to parsing, manipulating, and performing arithmetic with dates and times in R using the lubridate package.
- Querying Data with DuckDB from R
Querying data with DuckDB from R — run high-performance analytical SQL queries on CSV, Parquet, and in-memory data using dplyr and dbplyr integration.
- Debugging R Code — Master R's built-in debugging tools:
Debugging R code with traceback, browser, debug, and recover. Find and fix bugs using built-in tools for inspecting call stacks and variable state.
- Making HTTP Requests with httr2 in R
Master HTTP requests with httr2 in R. Make GET and POST requests, handle authentication, parse JSON responses, and build reliable API clients.
- Interactive Maps with leaflet
Learn to create interactive web maps in R using the leaflet package. Covers markers, popups, layers, and tile providers.
- Memory Management in R: Avoid Pitfalls and Handle Large Data
Memory management in R: learn copy-on-modify semantics, measure object sizes with lobstr, avoid common pitfalls, and work efficiently with large datasets.
- R Markdown: Reproducible Reports
Learn how to create dynamic, reproducible reports in R using R Markdown. Combine narrative, code, and output in one document.
- Parallel Computing in R
Learn how to speed up R code with parallel computing using the parallel package, future/furrr, mclapply, and parLapply.
- Building REST APIs with plumber
Building REST APIs in R using plumber: learn decorators, routing, request handling, JSON serialization, filters, and deployment for production web services.
- Polars R: High-Performance DataFrame Operations
Polars R delivers Rust-speed DataFrame operations in R. Covers installation, core methods, lazy evaluation, and how Polars R compares with dplyr and data.table.
- Profiling Optimizing R Code: Tools and Techniques
Profiling optimizing R code with Rprof, profvis, and bench: identify performance bottlenecks, compare implementations, and reduce memory usage.
- R5 Reference Classes in R
Learn about R's reference class system for object-oriented programming. Understand reference semantics, method definition, and when to use R5 over S3 and S4.
- Reproducible Environments with renv
Reproducible environments with renv: isolate R dependencies, lock versions with snapshot and restore, share projects across machines and CI pipelines.
- S3 Classes in R — Object-Oriented Programming
Learn how S3 classes work in R. Create custom S3 classes, define generic functions, and implement methods for your own data types.
- Organising Shiny Apps with Modules
Organising Shiny apps with modules for reusable UI and server components. Learn to structure large apps, communicate between modules, and write tests.
- S4 Classes in R: Formal OOP with setClass and Methods
Master R's S4 classes with setClass(), setMethod(), validation, and inheritance. S4 is R's formal OOP system with typed slots and multiple dispatch.
- Testing Shiny Apps with shinytest2
Testing Shiny apps with shinytest2 and testthat. Write automated tests, record interactions, and verify outputs to catch regressions before deployment.
- Spatial Data Analysis in R with sf
Learn spatial data analysis in R with the sf package. Covers creating, manipulating, and visualizing geographic features with simple features.
- SQLite R: Database Operations with DBI and RSQLite
SQLite R integration with DBI and RSQLite: connect, query with SQL and dbplyr, manage transactions, tune performance, and handle databases as portable files.
- Reproducible Pipelines with targets
Build reproducible pipelines in R with the targets package. Learn to design dependency graphs, parallel branching, and cloud storage for workflows.
- Web Scraping with rvest
Learn to extract data from web pages using R and rvest. This guide covers HTML parsing, CSS and XPath selectors, and respectful scraping.
- Classification Models with tidymodels
Build and evaluate classification models in R with tidymodels. Covers logistic regression, decision trees, random forests, and performance metrics.
- Functional Programming with purrr
Master functional programming in R with purrr. Learn map functions, error handling, and how to replace loops with elegant, maintainable code.
- Building and Publishing an R Package
A comprehensive guide to creating, documenting, testing, and publishing your own R packages using devtools, roxygen2, and testthat.
- Data Wrangling with dplyr
Master data wrangling with dplyr in R. A complete guide to filter, select, mutate, arrange, group_by, and summarise for efficient data transformation.
- Apply Family in R: lapply, sapply, tapply and More
The apply family in R replaces loops with concise functional iteration. Covers apply(), lapply(), sapply(), tapply(), plus mapply() and purrr equivalents.
- Error Handling in R: A Practical Guide
Master error handling in R: catch and recover from errors with tryCatch and try, create custom condition classes, and use finally for cleanup.
- Lists vs Vectors in R: When to Use Each Data Structure
Understand lists vs vectors in R, the two fundamental data structures. Learn when to use homogeneous vectors versus flexible lists for your R programming tasks.
- Regular Expressions in R
A comprehensive guide to pattern matching and text manipulation with regular expressions in R. Learn base R functions and stringr.
- Reading and Writing CSV Files in R
Learn how to read CSV files into R using base R and readr, write data frames to CSV, handle edge cases, and optimize for large files.
- String Manipulation with stringr
Master string manipulation with stringr in R. A complete guide to detecting, extracting, replacing, splitting, and formatting character strings.
- Understanding R Environments
A deep dive into R environments: how R searches for objects, the search path, parent environments, and how to use environments for reliable code.
- Writing Good R Functions in R
Learn how to write clean, reusable R functions with proper arguments, error handling, and documentation. Functions are the building blocks of reusable R code.
- Machine Learning in R with tidymodels: An Introduction
Learn machine learning in R with tidymodels. Build, compare, and evaluate ML models using a unified interface for data splitting, preprocessing, and training.