Homework Problem Set 3, Due Wednesday September 13, 2016. -------------------------------------------------------- Assigned 9/6/2017, due 9/13 worth 12 points (a) Define and test an R function "framfix" which takes as a single argument a data-frame (infram) and performs the following operations in the following order: (1) recodes all character missing entries "" to "Mis" (2) if there is a column named "age" or "Age", it recodes the (assumed numerical) entries to the mid-point of the 5-year age-range, i.e. values a in the interval (5k, 5k+5] for nonnegative integer k is replaced by 5k+2.5 (3) removes any column with more than 30% missing entries (4) produces a matrix called Quant , with labeled columns containing the 0.1, 0.25, 0.5, 0.75, and 0.9 quantiles of all NUMERIC columns of the data-frame remaining after step (3) (5) Recodes any "logical" column to {0,1} in place of FALSE, TRUE. The output of the function should be a list (with appopriately named components) containing the resulting data frame, the matrix Quant that you produced in step (4), and two numeric vectors, Rows containing the indices of the rows (of the new frame created after step (3), (4), or (5)) containing any missing data, and Cols containing the names of the columns (again, of the new frame created after step (5)) containing any missing data. (b) Test your function by applying it (1) to the "nepali" data-frame you used in HW2, (2) to the "Titanic3" data-frame obtained in the 5th command line of the log http://www.math.umd.edu/~slud/s705/Rlogs/OldLogs/F16Logs/Sep7F16.RLog shown in class, and (3) on a data-frame that you construct yourself (with at least 100 rows) to have the property that ALL of the steps (1)-(5) have some effect either in changing the data-frame or in producing non-empty output.