wrapping: wrapping tag for pre/post procession and composition

Description Usage Arguments Examples

Description

wrapping tag for pre/post procession and composition

Usage

1
wrapping(.before = NULL, .after = NULL, .around = identity)

Arguments

.before

an expression to run before the call

.after

an expression to run after the call, can use . as the result of the call

.around

a function, or formula, to apply around the call before evaluation, such as capture.output or SuppressWarnings

Examples

1
2
3
wrapping(.before = print("hello"),
          .after = print(paste("result was:", .)),
          .around = suppressWarnings)$sqrt(-1)

moodymudskipper/tags documentation built on June 25, 2019, 10:54 a.m.