11### Introduction
22
33This second programming assignment will require you to write an R
4- function is able to cache potentially time-consuming computations. For
4+ function that is able to cache potentially time-consuming computations. For
55example, taking the mean of a numeric vector is typically a fast
66operation. However, for a very long vector, it may take too long to
77compute the mean, especially if it has to be computed repeatedly (e.g.
88in a loop). If the contents of a vector are not changing, it may make
99sense to cache the value of the mean so that when we need it again, it
1010can be looked up in the cache rather than recomputed. In this
11- Programming Assignment will take advantage of the scoping rules of the R
11+ Programming Assignment you will take advantage of the scoping rules of the R
1212language and how they can be manipulated to preserve state inside of an
1313R object.
1414
@@ -17,7 +17,7 @@ R object.
1717In this example we introduce the ` <<- ` operator which can be used to
1818assign a value to an object in an environment that is different from the
1919current environment. Below are two functions that are used to create a
20- special object that stores a numeric vector and cache's its mean.
20+ special object that stores a numeric vector and caches its mean.
2121
2222The first function, ` makeVector ` creates a special "vector", which is
2323really a list containing a function to
@@ -64,8 +64,8 @@ function.
6464
6565### Assignment: Caching the Inverse of a Matrix
6666
67- Matrix inversion is usually a costly computation and their may be some
68- benefit to caching the inverse of a matrix rather than compute it
67+ Matrix inversion is usually a costly computation and there may be some
68+ benefit to caching the inverse of a matrix rather than computing it
6969repeatedly (there are also alternatives to matrix inversion that we will
7070not discuss here). Your assignment is to write a pair of functions that
7171cache the inverse of a matrix.
0 commit comments