R Function Default ArgumentsIn R, function can have default values of it's parameters. It means while defining a function, it's parameters can be set values. It makes function more generic. For example # Calling function Output: 20 # Calling function Output: 30 First time, function is called with single argument and default value is used for second argument. Function called successfully and produce a result. Second time, function is called with two arguments, default value of second argument is overridden.
Next TopicR Built-in Functions
|