set_hooks: Set hooks.

Description Usage Arguments Examples

View source: R/hooks.r

Description

This wraps the base setHook function to provide a return value that makes it easy to undo.

Usage

1
set_hooks(hooks, action = "append")

Arguments

hooks

a named list of hooks - each hook can either be a function or a list of functions.

action

"replace", "append" or "prepend"

Examples

1
2
3
4
5
new <- list(before.plot.new = function() print("Plotted!"))
hooks <- set_hooks(new)
plot(1)
set_hooks(hooks, "replace")
plot(1)

evaluate documentation built on July 18, 2018, 9 a.m.

Related to set_hooks in evaluate...