The matrics library is not available in your RStudio by default. You need to install this library. You can use the below command to install this.
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: