funcall: Function call with optional inverse

View source: R/sitarlib.R

funcallR Documentation

Function call with optional inverse

Description

Applies an expression to vector v, optionally inverting the expression first. For example if the expression is log, funcall returns log(v) if inverse is FALSE, and exp(v) if inverse is TRUE.

Usage

funcall(v, vcall, inverse = FALSE)

Arguments

v

vector

vcall

expression

inverse

logical

Details

Inverse covers functions log, exp, sqrt, ^, *, /, +, -.

Value

Returns a vector of length v.

Author(s)

Tim Cole tim.cole@ucl.ac.uk


sitar documentation built on July 9, 2023, 6:51 p.m.