Categories

Nov 6, 2019 in R Language
Q:

Functions in R Programming (with Example)

1 Answer

Nov 6, 2019

 function, in a programming environment, is a set of instructions. A programmer builds a function to avoid repeating the same task, or reduce complexity.

A function should be

  • written to carry out a specified a tasks
  • may or may not include arguments
  • contain a body
  • may or may not return one or more values.

A general approach to a function is to use the argument part as inputs, feed the body part and finally return an output. The Syntax of a function is the following:

function (arglist)  {
  #Function body
}
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Jul 28, 2019 in R Language
Nov 6, 2019 in R Language
Nov 4, 2019 in R Language
...