call {base}R Documentation

Function Calls


Create or test for objects of mode "call".


call(name, ...)


name a character string naming the function to be called.
... arguments to be part of the call.
x an arbitrary R object.


call returns an unevaluated function call, that is, an unevaluated expression which consists of the named function applied to the given arguments (name must be a quoted string which gives the name of a function to be called). is used to determine whether x is a call (i.e., of mode "call"). It is generic: you can write methods to handle specific classes of objects, see InternalMethods.

Objects of mode "list" can be coerced to mode "call". The first element of the list becomes the function part of the call, so should be a function or the name of one (as a symbol; a quoted string will not do).


Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

See Also for calling a function by name and argument list; Recall for recursive calling of functions; further is.language, expression, function.

Examples #-> FALSE: Functions are NOT calls

# set up a function call to round with argument 10.5
cl <- call("round", 10.5) TRUE
# such a call can also be evaluated.
eval(cl)# [1] 10

[Package base version 2.1.0 Index]