Function in R Language
In R language, we can call a function by typing its name followed by one or more parameters in the parenthesis of that function.
Let’s see the example of SUM function.
Function to repeat values: rep function
To repeat some values, we will call the rep function and provide its times arguments.
Let’s see an example to repeat “Yo ho!” for three times.
To get Square root of a number: Sqrt function
To get square root of any number, we will use sqrt() function.
Let’s see an example to get the square root of 16.
Help(func_name) is used to get the help for the given function.
Let’s see the example to display the help for function sum.
example(func_name) is used to see the examples of usage for the given function.
Lets see the example of min() function.
Let’s see the help for rep() function:
In next tutorial, we will read about Files in R Language….