Skip to contents

Combines options from options with withr. Same as options::opt_set_local, except based on withr::defer and friends.

Usage

opt_set_local2(x, value, envir = parent.frame(), priority = c("first", "last"))

Arguments

x

An option name.

value

A new value to update the associated global option

envir

[environment]
Attach exit handlers to this environment. Typically, this should be either the current environment or a parent frame (accessed through parent.frame()).

priority

[character(1)]
Specify whether this handler should be executed "first" or "last", relative to any other registered handlers on this environment.