Skip to contents

Temporarily monkey patch a namespaced method

Usage

with_monkey_patch(fqn, wrapper, code, .envir = parent.frame())

Arguments

fqn

the fully qualified name, e.g. "rmarkdown::html_document"

wrapper

a wrapper with signature function(cmd, args, func)

code

user code

.envir

the environment in which to evaluate expr