evalb: Near 'eval(bquote(expr))' shortcut.

View source: R/bquotefn.R

evalbR Documentation

Near eval(bquote(expr)) shortcut.

Description

Evaluate expr with bquote .() substitution. Including .(-x) promoting x's value from character to a name, which is called "quote negation" (hence the minus-sign).

Usage

evalb(expr, where = parent.frame())

Arguments

expr

expression to evaluate.

where

environment to work in.

Value

evaluated substituted expression.

Examples


if(requireNamespace('graphics', quietly = TRUE)) {
   angle = 1:10
   variable <- as.name("angle")
   fn_name <- 'sin'
   evalb(  plot(x = .(variable), y = .(-fn_name)(.(variable))) )
}


wrapr documentation built on Aug. 20, 2023, 1:08 a.m.