The apply() function is an alternative to writing loops, via applying a function to columns, rows, or individual values of an array or matrix. The structure of the apply() function is: apply(X, MARGIN, FUN, ...) The matrix variable used for the exercises is: dataset1 <- cbind(observationA = 16:8, observationB = c(20:19, 6:12)) Answers to the