Skip to content

Function sd() that calculates standard deviation needs two arguments as an input as per the documentation. Arguments for which defaults values have not been provided need to be inputted by the uder failing which an error is thrown.

args() funtion.

Used to learn about the arguments of a function without having to go through its entire documentation.

Wrap-up

• Functions work like a black box • Argument matching: by position or by name • Function arguments can have defaults • As previously mentioned, if you do not specify the value of argument that has no default values, an error would be outputted.