Learn R Programming

wrapr (version 1.9.6)

ApplyTo: Apply a single argument function to its argument.

Description

If x is a UnaryFn instance this function returns a new UnaryFnList representing the composite function c(f, x) which is interpreted as the function x(f(.)) (composition from left to right). Otherwise evaluate f(x) (application from left to right).

Usage

ApplyTo(f, x, env = parent.frame())

# S4 method for UnaryFnList,UnaryFnList ApplyTo(f, x, env = parent.frame())

# S4 method for UnaryFnList,UnaryFn ApplyTo(f, x, env = parent.frame())

# S4 method for UnaryFn,UnaryFnList ApplyTo(f, x, env = parent.frame())

# S4 method for UnaryFn,UnaryFn ApplyTo(f, x, env = parent.frame())

# S4 method for UnaryFnList,ANY ApplyTo(f, x, env = parent.frame())

# S4 method for PartialNamedFn,ANY ApplyTo(f, x, env = parent.frame())

# S4 method for PartialNamedFn,UnaryFnList ApplyTo(f, x, env = parent.frame())

# S4 method for PartialNamedFn,UnaryFn ApplyTo(f, x, env = parent.frame())

# S4 method for PartialFunction,ANY ApplyTo(f, x, env = parent.frame())

# S4 method for PartialFunction,UnaryFnList ApplyTo(f, x, env = parent.frame())

# S4 method for PartialFunction,UnaryFn ApplyTo(f, x, env = parent.frame())

# S4 method for SrcFunction,ANY ApplyTo(f, x, env = parent.frame())

# S4 method for SrcFunction,UnaryFnList ApplyTo(f, x, env = parent.frame())

# S4 method for SrcFunction,UnaryFn ApplyTo(f, x, env = parent.frame())

Arguments

f

object of S4 class derived from UnaryFn.

x

argument.

env

environment to work in.

Value

f(x) if x is not a UnaryFn else f composed with x.