Code Availability

DESCRIPTION:

is.loaded returns a logical value stating if the given object is currently loaded into S-PLUS. The symbol functions return the symbol that would be associated with a name.

USAGE:

is.loaded(symbol) 
symbol.C(name) 
symbol.For(name) 
symbol.S(name) 

REQUIRED ARGUMENTS:

symbol
a symbol, typically the result of symbol.C or symbol.For.
name
a character string giving the name of a subroutine.

VALUE:

The is.loaded function returns a logical value: it is TRUE if the symbol is found in the S-PLUS symbol table and FALSE otherwise. The symbol.C function returns the symbol that would be produced by a C function named name . The symbol.For function returns the symbol that would be produced by a Fortran subroutine named name. The symbol.S function returns the symbol that would be produced by an old-S function named name.

DETAILS:

These functions are mainly useful for writing S-PLUS functions that will automatically dynamically link code if it is not loaded already.

The symbol.S function is no longer useful.

SEE ALSO:

, .

EXAMPLES:

if(!is.loaded(symbol.C("mbol"))) 
        dyn.open("/usr/mabel/mbol.so") 
.C("mbol",as.double(x),as.integer(length(x)))