The basic syntax for a custom R function is FunctionName = function(Argument(s)) {Statement(s)} . All functions are assigned a name FunctionName; they end up as objects in your workspace, and are implemented by name. Argument(s) represented the input data objects, which can range for one to several.