| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This README is adapted from assignment text provided by the course instructor.
###Introduction This programming assignment required me to write an R function that is able to cache potentially time-consuming computations. For example, taking the mean of a numeric vector is typically a fast operation. However, for a very long vector, it may take too long to compute the mean, especially if it has to be computed repeatedly (e.g. in a loop). If the contents of a vector are not changing, it may make sense to cache the value of the mean so that when we need it again, it can be looked up in the cache rather than recomputed. In this Programming Assignment we took advantage of the scoping rules of the R language and how they can be manipulated to preserve state inside of an R object.
###The Assignment The instructor provided a highly related example of code, showing how to store and retrieve the mean of a vector. See Assignment_README.md.
The assignment itself was to write a pair of analogous functions to cache and retrieve the inverse of a matrix. Matrix inversion is usually a costly computation and there may be some benefit to caching the inverse of a matrix rather than compute it repeatedly. While I understand there are also alternatives to matrix inversion, they were not discussed in this class.
###Repo Contents This GitHub repo contains three documents:
cachematrix.R contains the following functions:
###Process In order to complete this assignment, I had to do the following:
###Grading This assignment will be graded via peer assessment. Peer, I want to thank you for your time!
| Back | FazBrowse Home | New Git URL |