It should be emphasized that most of the functions supplied as part of the . system, such as mean(), var(), postscript() and so on, are themselves written in . and thus do not differ materially from user written functions.
A function is defined by an assignment of the form
name <- function(arg1 , arg2 , ...) expression
The expression is an . expression, (usually a grouped expression), that uses the arguments, argi , to calculate a value. The value of the expression is the value returned for the function.
A call to the function then usually takes the form name(expr1 , expr2 , ...) and may occur anywhere a function call is legitimate.