Explain how to create a function in R.
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how to write a function in R, from the basic syntax to arguments, default values and return values. Tests whether a data scientist can write reusable R code and understands how R functions match arguments, evaluate them and look up variables.