as.vf: Coerce functions to a virtual function.

as.vfR Documentation

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)

Arguments

x

Generally, a function or numeric

Value

Returns an object of class vf.

Note

It is rarely necessary to coerce objects such as vectors or matrices to class vf because the Arith methods operate on objects of class ANY directly.

Author(s)

Robin K. S. Hankin

Examples

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

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


vfunc documentation built on Aug. 8, 2025, 6:20 p.m.