R Exercises – 21-30 – The Apply Family of Functions

1. Function ‘apply’ on a simple matrix: a. Get the following matrix of 5 rows and call it ‘mymatrix’ b. Get the mean of each row c. Get the mean of each column d. Sort the columns in ascending order 2. Using ‘lapply’ on a data.frame ‘mtcars’ a. Use three ‘apply’ family functions to get the minimum values 

Continue Reading…

Quality R Training for You