mask: Evaluate a function or expression in a masking environment

Description Usage Arguments Value Examples

View source: R/mask.R

Description

Evaluate a function or expression in a masking environment

Usage

1
mask(x, envir = rlang::caller_env())

Arguments

x

A function or an expression

envir

An environment or a name of a package as a 'character', which should be injected between the execution environment and the current parent environment.

Value

In the case that 'x' is a function, the result is a a copy of the function in a new enclosing environment. Otherwise, the result of 'x' executing in the new environment.

Examples

1
mask(mtcars %>% dplyr::select(mpg, cyl), "tidylog")

TylerGrantSmith/mask documentation built on Jan. 10, 2020, 12:05 a.m.