funcOrExp: Using function or parsing expression for normal class

Description Usage Arguments Value Examples

View source: R/methods.R

Description

Evaluating a function or expression by the type of method.

Usage

1
funcOrExp(method, ...)

Arguments

method

if the class of method is "character", regarding method as a function and evaluating THE_METHOD(...). If the class of method is "function", return the result of method(...). If the class of method is "expression", return the result of eval(method).

...

arguments passed onto method if the class of method is "character" or "function".

Value

Evaluated result.

Examples

1
2
3
funcOrExp(sample, 5)
funcOrExp('sample', 5)
funcOrExp(parse(text='sample(5)'))

iteremoval documentation built on Nov. 8, 2020, 11:12 p.m.