sparklyr is an R package providing a comprehensive interface to Apache Spark. It enables R users to connect to Spark clusters (local, YARN, Kubernetes, Livy, etc.), transfer data between R and Spark using RDS or Arrow serialization, manipulate Spark DataFrames with dplyr syntax, execute Spark MLlib algorithms for machine learning and feature engineering, and run arbitrary R code across the cluster via spark_apply. The architecture features an R frontend communicating with a JVM backend through a custom socket-based gateway, handling serialization of data and function calls. Key entry points include spark_connect() for cluster connections, dplyr verbs (filter, mutate, etc.) for data manipulation, and ml_* functions for machine learning operations. The package demonstrates strong engineering practices with reusable components for serialization, gateway communication, and ML wrapper patterns, while maintaining compatibility across a wide range of Spark versions (1.5.2 to 4.0.x).
The progressr package provides a minimal, unifying API for reporting progress updates in R. It separates progress signaling (developer-controlled) from progress presentation (end-user controlled) using R's condition system. Developers create progressor functions to signal updates, while end users configure handlers to determine how progress is displayed (terminal, GUI, audio, notifications, or file-based). The architecture centers around a handler plugin system where `with_progress()` manages context and handler state. Key features include integration with parallel frameworks (future, furrr, plyr), Shiny compatibility via `withProgressShiny()`, and a global progression handler for R ≥ 4.0.0. The package emphasizes flexibility—handlers can be mixed and matched, progress reporting can be suppressed, and updates work seamlessly in iterative and parallel contexts. Software engineering rigor is evident through an extensive test suite (50+ test scripts in `inst/testme/`), continuous integration, semantic versioning, and comprehensive vignettes. The design avoids tight coupling—core components like `progressor()`, `with_progress()`, and `progress_aggregator()` are isolated and reusable. While dependencies on optional packages (cli, progress, beepr, etc.) introduce some maintenance complexity, the core remains stable and well-maintained with recent activity.
box is an R package that provides a modern, modular module system for organizing R code into hierarchical, composable, and reusable modules. It replaces the traditional `library` and `require` functions with a declarative, explicit import syntax (`box::use`) that supports selective name attachment, aliasing, and scoped imports. The system handles both packages and local R scripts as first-class modules, supports S3 method registration, cyclic imports, interactive help, and module lifecycle hooks (`.on_load`, `.on_unload`). The architecture is built on custom environment manipulation, a PEG-like specification parser, a caching layer for loaded modules, and a small C extension for performance-critical operations. The codebase is well-structured, extensively tested, and demonstrates advanced use of R's environment and S3 dispatch mechanisms.
magrittr is an R package that provides forward-pipe operators for chaining operations, most notably the %>% operator. The package transforms sequences of nested function calls into left-to-right pipelines, improving code readability and maintainability. Implemented with a hybrid R/C architecture, the core pipe logic is written in C for performance while maintaining R's semantics. The package supports lazy evaluation (since v2.0), allowing proper handling of warnings, errors, and side effects in pipelines. It includes specialized operators for assignment (%<>%), tee (%T>%), and exposition (%$%), plus aliases for base R operators to facilitate pipeline usage. The architecture features non-standard evaluation to capture pipeline expressions, which are then transformed and executed via a C backend. Lazy evaluation is implemented using R's promise mechanism, ensuring expressions are only evaluated when needed while preserving proper visibility semantics. The package also supports building functional sequences (unary functions) from pipelines starting with the placeholder dot (.).
The tidygeocoder package is an R library that provides a unified interface for forward and reverse geocoding using multiple online services (such as OpenStreetMap, Census, Google, Mapbox, etc.). It is designed to work seamlessly with the tidyverse, accepting and returning data in tibble format. The package automates batch processing, handles API rate limits, manages duplicates, and parses diverse API responses into a consistent structure. Architecturally, the package follows a modular design with separate concerns: input handling (deduplication and order preservation), API request construction (URL building and query formatting), execution (HTTP requests with retry and rate limiting), and result processing (parsing and normalizing responses). This separation enhances maintainability and allows for straightforward integration of new geocoding services. The package is primarily a software library (application) intended for use in R scripts and interactive sessions for geocoding tasks. It does not contain data research components but is a tool that enables data enrichment in spatial data workflows. Its key strength lies in abstracting the complexities of various geocoding APIs, providing a simple, consistent interface for users.
gptstudio is an R package that integrates Large Language Models (LLMs) directly into the RStudio development environment. It functions as both a standalone Shiny application and a suite of RStudio add-ins. The core architecture relies on the {ellmer} package for LLM interactions, abstracting various providers (OpenAI, Anthropic, HuggingFace, etc.) through a unified S3 interface. Key features include a chat interface with conversation history, code commenting, and spelling/grammar checking add-ins. The package demonstrates strong engineering practices with comprehensive testing (shinytest2, testthat), modern UI theming (bslib), and support for streaming responses and audio input. It effectively bridges the gap between RStudio's IDE capabilities and external AI services.
S7 is an R package that implements a new object-oriented programming system intended to succeed S3 and S4. Developed by the R Consortium OOP Working Group, it provides formal class definitions via `new_class()`, a property system with type checking and validation, generic functions with multiple dispatch, method registration, and comprehensive compatibility with S3 and S4. The package includes a C extension for performance-critical dispatch and property access. The architecture is a standard R package with exported API functions, internal helper modules, and extensive test coverage. It is consumed as a dependency by several other packages and is designed to eventually be incorporated into base R. There are no data analysis or research-specific components; the entire repository focuses on language infrastructure for object-oriented programming.
This R package defines an S3 class `units` that attaches measurement units (e.g., meters, seconds, kg) to numeric vectors, matrices, and data frame columns. It provides automatic unit propagation, conversion, derivation, and simplification through arithmetic operations, built on the UNIDATA udunits2 C library. The package integrates with ggplot2 for axis/scale labeling, supports conversion to/from difftime and POSIXct, and offers helpers like `set_units()`, `mixed_units()`, and `keep_units()` for preserving units across operations that would otherwise strip them. It is actively maintained, with comprehensive tests, CI workflows, reverse dependency checks, and vignettes demonstrating its use in scientific and geospatial computing. While the core unit logic is delegated to udunits2, the R implementation demonstrates clean S3 method dispatch, careful handling of unit symbols, and a reusable pattern for attribute preservation.
This is an R package (`parameters`) from the easystats ecosystem that provides a unified interface for extracting, formatting, and comparing parameters from a vast array of statistical models (lm, glmmTMB, brms, lme4, lavaan, fixest, etc.). The package functions as a model-parameter reporting engine: it takes a fitted model object and returns a tidy data frame with coefficients, standard errors, confidence intervals, p-values, and effect sizes, supporting various inference methods (Wald, profile, bootstrap, Kenward-Roger, Satterthwaite). Beyond basic extraction, it offers standardization, bootstrapping, equivalence testing, p-value functions, dominance analysis, and data reduction (PCA, EFA, clustering). The architecture relies heavily on S3 generic dispatch (e.g., `model_parameters.lm`, `model_parameters.glmmTMB`) and integrates with the easystats stack (`insight` for model introspection, `bayestestR` for Bayesian indices, `datawizard` for data manipulation). Output can be formatted as plain text, markdown, or HTML, making it suitable for both interactive use and automated reporting. The package is actively maintained with extensive test coverage and continuous integration.
NIMBLE is an R package for hierarchical Bayesian modeling that implements a domain-specific language (BUGS) for model specification and compiles models to C++ for efficient MCMC, Laplace approximation, and other inference algorithms. The architecture is a hybrid R/C++ system where R handles model parsing, compilation orchestration, and high-level algorithm construction, while generated C++ code (using embedded Eigen and CppAD libraries) performs efficient sampling and automatic differentiation. Key entry points include `nimbleModel()`, `buildMCMC()`, `runMCMC()`, and `compileNimble()`. The package provides a 'programming with models' framework allowing users to write custom inference algorithms that operate on arbitrary model structures. It bundles extensive classic BUGS benchmarks for regression testing. While the core functionality is well-maintained, the vendored Eigen and CppAD libraries and the complex compilation system introduce potential drift risks.
The export package is an R library designed for streamlined export of R graphs and statistical output to various formats including bitmap (PNG/JPG/TIF), vector (SVG/PDF/EPS), Microsoft Office/LibreOffice (PPTX/DOCX/XLSX), CSV, and HTML/LaTeX. It provides a consistent interface where users can export plots by passing plot objects directly, using the currently active graph, or supplying a function to generate the plot. The architecture follows standard R package conventions with modular design: separate files handle different export types (graph2*.R for graphs, table2*.R for tables), while shared utility functions in utils.R manage common tasks like dimension calculation, plot resolution, and template selection. The package integrates with downstream libraries such as officer, rvg, flextable, xtable, broom, and stargazer to perform the actual export operations, adding sensible defaults and unified parameter handling on top of these tools.
The kjhealy/socviz repository is an R package that provides curated datasets and utility functions for teaching data visualization using ggplot2, primarily as a companion to the book "Data Visualization: A Practical Introduction" (2nd edition, 2026). It bundles approximately 30 social science datasets sourced from US Census Bureau data (county demographics, poverty), the General Social Survey, US election results (historic through 2024), OECD economic indicators, FRED time series, opiate mortality, and others. These datasets are clean, well-documented, and compressed for efficient loading via `data()`. The package also includes small utility functions (e.g., `theme_socviz`, `%notin%`, `round_df`) that support common data visualization workflows. While the primary value lies in the ready-to-use datasets rather than complex transformations, the package is properly structured with roxygen2 documentation, pkgdown site, and CRAN CI checks. It is a solid resource for educators and students learning R graphics, though reproducibility of the raw data pipelines depends on external sources that may change over time.
gpttools is an R package that extends RStudio with large language model (LLM) capabilities for R package development. It provides a suite of RStudio addins for tasks such as generating roxygen documentation, suggesting unit tests, converting scripts to functions, and a Copilot-style ghost text writer. The package also includes a retrieval-augmented generation (RAG) system that scrapes documentation, creates embeddings, and indexes them for context-aware chat. It supports multiple AI providers (OpenAI, Anthropic, Perplexity, Cohere, Ollama, Azure OpenAI, Google) via a modular streaming handler pattern, and offers both cloud-based and local (sentence-transformers, Ollama) embedding options. The architecture is a mix of R functions, Shiny apps (settings, retrieval chat, data documentation), and Python integration via reticulate for local models. Key entry points include the addins, the chat() function, chat_with_context() for RAG, and the crawl() function for building indexes. External dependencies include the gptstudio package, various LLM APIs, and a Python environment for local embeddings. While primarily an application, it incorporates data engineering patterns for scraping, chunking, embedding, and indexing documentation.
This is an R/Bioconductor package for making enriched heatmaps, primarily used in epigenomics to visualize enrichment of genomic signals (e.g., histone modifications, DNA methylation) around target regions (e.g., transcription start sites). The package provides a workflow: normalize signals to a matrix via `normalizeToMatrix()`, then draw a heatmap with `EnrichedHeatmap()`, which is a subclass of ComplexHeatmap. It includes specialized annotation (`anno_enriched()`), row ordering by enrichment scores, smoothing, and support for categorical signals. The architecture leverages S3 classes (normalizedMatrix) and integrates with GenomicRanges for genomic interval operations. It is well-documented with vignettes and a pkgdown site, and includes Rcpp for performance-critical distance calculations. While the package is actively maintained, there are some signs of technical drift such as deprecated arguments and an old CI configuration.
maftools is an R/Bioconductor package for the analysis and visualization of somatic mutations in cancer genomics, primarily using Mutation Annotation Format (MAF) files. It provides a comprehensive suite of functions for reading, summarizing, and plotting mutation landscapes (oncoplots, lollipop plots, rainfall plots), detecting driver genes, analyzing mutational signatures via NMF, assessing tumor heterogeneity (MATH score), comparing cohorts, and integrating copy number alterations from GISTIC or ASCAT. The package also includes tools for converting other formats (ANNOVAR, ICGC) to MAF, querying cancer hotspots directly from BAM files via a C backend, and detecting sample swaps. It is widely used by cancer researchers and relies on Bioconductor infrastructure, with extensive bundled reference data (COSMIC signatures, cancer hotspots, TCGA burden). While primarily a software library, its heavy use of precompiled research data and domain-specific pipelines gives it a hybrid character. The codebase is well-structured with S4 classes and data.table for performance, though some functions have long parameter lists and a few deprecated modules.
ggprism is an R package that extends ggplot2 to replicate the visual aesthetics of GraphPad Prism. It provides themes, color/fill/shape palettes, and specialized geoms/guides to create publication-ready plots matching Prism's default styling. Key functionalities include applying Prism-like themes via `theme_prism()`, using discrete palettes with `scale_*_prism()` functions, adding statistical annotations (e.g., p-value brackets) with `add_pvalue()` and `geom_bracket()`, and customizing axes with specialized guides like `guide_prism_offset()` for offset ticks. The package follows ggplot2 extension conventions, using ggproto for custom geoms, discrete_scale for scales, and guide objects for axis modifications. It includes built-in datasets (e.g., wing morphology data) and relies on standard R datasets in examples. External dependencies center on ggplot2, scales, and rlang, with optional packages like ggnewscale and patchwork used in vignettes.