User Defined Functions in R Exercises (Part 1)
In the Exercises we will discuss User Defined Function in R
Answers to the exercises are available here.
Create a function to print square of number
Create a function to print a number raise to another with the one argument a default argument
Create a function to print class of an argument
Create a function to accept two matrix arguments and do matrix operations with same.
Create a user defined function to accept a name from the user
Create a user defined function to accept values from the user using scan and return the values
Create a user defined function to create a matrix and return the same.
Create a function to take two arguments, one student marks and other student names and plot a graph based on the same.
Create a function to accept an employee data frame(Name,Gender,Age,Designation & SSN) and print the First & Fifth employee as well as the Names & the Designation of all the employees in the function
Create a function to create an employee data frame(Name,Gender,Age,Designation & SSN) and return the Name,Age & Designation of all employees.