Create a function in R: Function function() allows us to create specific functions. Between parenthesis we put the name of the parameters we want to create to be used in our function. Function(parameter1, parameter2, ...){ statements return(object) } NameFunction0 = function ( x , y ) { return ( ( x + y ) / 2 ) } NameFunction0 ( 4 , 5 ) ## [1] 4.5 If we want use a parameter that may or may not be specified we use parameter = NULL : NameFunction1 = function ( x , y = NULL ) { if ( ! is.null ( y ) ) x = x + y return ( x ) } NameFunction1 ( 5 , 10 ) #with 2 paramers (x,y) ## [1] 15 NameFunction1 ( 5 ) #with only only parameter (x) ## [1] 5 Initial Data Analysis Functions Here we have created some basic functions that can be used for initial data analysis of our data: INLIERS returns the values of a vector that are between the vales ...