Function Objects

DESCRIPTION:

Coerces to or tests for function objects, that is, objects with mode function.

USAGE:

as.function(x) 
is.function(x) 

REQUIRED ARGUMENTS:

x
a S-PLUS object.

VALUE:

as.function merely changes the mode of x to "function".

is.function tests whether x is a function.

DETAILS:

Both of these functions are generic; currently there are no methods written for either of them.

SEE ALSO:

.

EXAMPLES:

polynom <- function(x) 
{ 
        x^2 + 3 * x - 6 
} 
is.function(polynom) # returns TRUE