r-rudra / patch

{patch} is #rstats package for patching functions on the fly
Other
4 stars 0 forks source link

patch

Modify or Patch any Function Programmatically

Patch functions programmatically in a robust way so that the patch will work even if there is a change (up to an extent) in the target function. The changes are additive. The changes can be reverted back to the original (within a single session of the package).

Installation

You can install the development version from GitHub with:

# You need {remotes} for that (I think you already have that)
# install.packages("remotes")
remotes::install_github("r-rudra/patch")

Example

Just try out following:

library(patch)
help("patch_function")
# possibly you'll be interested in 
# source(system.file("embedded","usecases.R",package = "patch"))
# but read warnings before it :-)