Learn R Programming

drake (version 4.4.0)

silencer_hook: Function silencer_hook

Description

an example hook argument to make() that redirects output and error messages

Usage

silencer_hook(code)

Arguments

code

code to run to build the target.

See Also

make, message_sink_hook, output_sink_hook

Examples

Run this code
# NOT RUN {
silencer_hook({
  cat(1234)
  stop(5678)
})
x <- workplan(loud = cat(1234), bad = stop(5678))
make(x, hook = silencer_hook)
# }

Run the code above in your browser using DataLab