Learn R Programming

cxxfunplus (version 1.0.2)

is.null.cxxfun: Tell if the address of functions created by cxxfunction points to NULL

Description

The function object returned by cxxfunction cannot be saved across R sessions. This function can be used to see if we still have a valid function object. Also this function can be used for functions returned by grab.cxxfun of S4 class cxxdso since these functions are essentially created by cxxfunction or similarly.

Usage

is.null.cxxfun(cx)

Value

Logical: TRUE null pointer; FALSE, not null, this function can still be called.

Arguments

cx

A function of class CFunc

Details

R could not save the function objects that point to dynamically loaded functions, especially for those function created on the fly using package inline at least for one reason that those DSO's are deleted after quitting R. So it is always safe to tell if it is valid before call functions created by cxxfunction.

See Also

cxxfunction