is.function: Is an Object of Type (Primitive) Function?

Description Usage Arguments Details Value Examples

Description

Checks whether its argument is a (primitive) function.

Usage

1
2

Arguments

x

an R object.

Details

is.primitive(x) tests if x is a primitive function (either a "builtin" or "special" as described for typeof)? It is a primitive function.

Value

TRUE if x is a (primitive) function, and FALSE otherwise.

Examples

1
2
3
4
is.function(1) # FALSE
is.function(is.primitive)  # TRUE: it is a function, but ..
is.primitive(is.primitive) # FALSE:it's not a primitive one, whereas
is.primitive(is.function)  # TRUE: that one *is*

robertzk/monadicbase documentation built on May 27, 2019, 10:35 a.m.