Learn R Programming

vfunc (version 1.0)

as.vf: Coerce functions to a virtual function.

Description

Coerce objects to a virtual function. Numeric or complex arguments are coerced to a constant function.

Usage

as.vf(x)

Value

Returns an object of class vf.

Arguments

x

Generally, a function or numeric

Author

Robin K. S. Hankin

Examples

Run this code
as.vf(\(x)x^2)
Sin + as.vf(\(p){p^3})

as.vf(1:10)(1e99)

Run the code above in your browser using DataLab