hotpatchR: Runtime Namespace Patching Utilities for R Packages

Provides utilities for runtime hotpatching of locked R package namespaces. The package enables dynamic injection of function patches into sealed package environments without rebuilding or redeploying the package. This is particularly useful for legacy containerized workflows where package versions are frozen in place. The core functionality includes inject_patch() to inject patches into package namespaces, undo_patch() to restore original functions, apply_hotfix_file() to apply patches from external R scripts, and test_patched_dir() to run test suites against patched packages. The package implements namespace surgery techniques that allow internal callers to automatically see patched functions.

Version: 0.1.0
Imports: testthat (≥ 3.0.0)
Suggests: knitr, rmarkdown, pkgdown
Published: 2026-04-24
DOI: 10.32614/CRAN.package.hotpatchR (may not be active yet)
Author: David Munoz Tord [aut, cre]
Maintainer: David Munoz Tord <david.munoztord at mailbox.org>
License: MIT + file LICENSE
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: hotpatchR results

Documentation:

Reference manual: hotpatchR.html , hotpatchR.pdf
Vignettes: hotpatchR Overview (source, R code)

Downloads:

Package source: hotpatchR_0.1.0.tar.gz
Windows binaries: r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): hotpatchR_0.1.0.tgz, r-oldrel (arm64): hotpatchR_0.1.0.tgz, r-release (x86_64): not available, r-oldrel (x86_64): hotpatchR_0.1.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=hotpatchR to link to this page.