how do you define a function in r. There are any references about how do you define a function in r in here. you can look below.