What does the return()
function do in R?
a) Ends a function and returns a value
b) Prints a message
c) Stops a script
d) None of the above
Answer:
a) Ends a function and returns a value
Explanation:
The return()
function in R is used to return a value from a function and end its execution.