We continue to discuss data structures in R, this time focusing on matrices. We cover how to form matrices with functions such as matrix(), cbind() and rbind(), and functions related to the dimensions of a matrix: dim(), nrow(), ncol() and length(). We also discuss some aspects of matrix algebra, including the matrix multiplication operator %*%, and various functions for manipulating matrices. Special attention is given to diag() and solve(). While watching this video you should open Mod10Script.R and follow along with Examples 2 & 3.
This video covers fundamental material of great importance for R
programming. However, if you have some prior experience with R, the
content here may be a review for you.