Temporarily change the verbosity.

with_verbosity(level, code)

Arguments

level

A scalar (integer vector of length one), possibly -Inf or +Inf.

code

Any object. Code to execute in the temporary environment.

Value

The result of the evaluation of the code argument.

Details

Verbosity is temporarily changed.

See also

withr for examples of 'with_' methods, get_verbosity, and set_verbosity.

Examples

define("foo", NULL, { "bar" })
#> [2018-12-02T17:14:13 CET] Defining 'foo' ... OK
with_verbosity(-Inf, { make("foo") })
#> [1] "bar"