This help topic is for R version 2.9.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/is.function.html
is.function {base}R Documentation

Is an Object of Type (Primitive) Function?

Description

Checks whether its argument is a (primitive) function.

Usage

is.function(x)
is.primitive(x)

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)?

Value

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

Examples

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*

[Package base version 2.9.0 ]