call {base}R Documentation

Function Calls


Create or test for objects of mode "call" (or "(", see Details).


call(name, ...)





arguments to be part of the call.


an arbitrary R object.





is used to determine whether x is a call (i.e., of mode "call" or "("). Note that


If you think of using<string>), consider using str2lang(*) which is an efficient version of parse(text=*). Note that call() and, when applicable, are much preferable to these parse() based approaches.

All three are primitive functions.






Producing calls etc from character: str2lang and parse.

Examples #-> FALSE: Functions are NOT calls

## set up a function call to round with argument 10.5
identical(quote(round(10.5)), # <- less functional, but the same
          cl) # TRUE
## such a call can also be evaluated.
eval(cl) # [1] 10

class(cl) # "call"
typeof(cl)# "language" && is.language(cl) # always TRUE for "call"s

A <- 10.5
f <- "round"
f <- round
(g <-, quote(A))))
## alternatively but less transparently
g <- list(f, quote(A))
mode(g) <- "call"
## see also the examples in the help for

[Package base version 3.6.0 Index]