Skip to main content

1.6) Functions And Their Arguments


F. Function names are normally all lower-case and followed by round brackets: e.g. mean(). Most functions can or must be given arguments within the brackets. Arguments are the parameters or data that functions work on; they may be numbers, characters or other objects – often vectors. Arguments have names (although you can omit these if you know the order in which the arguments are required) and they are always separated by commas. So a typical function might be used as follows: Result <- fun(arg1=a, arg2=b).