File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,6 @@ makeCacheMatrix <- function(x = matrix()) {
1818 getinv = getinv )
1919}
2020
21- makeVector <- function (x = numeric ()) {
22- m <- NULL
23- set <- function (y ) {
24- x <<- y
25- m <<- NULL
26- }
27- get <- function () x
28- setmean <- function (mean ) m <<- mean
29- getmean <- function () m
30- list (set = set , get = get ,
31- setmean = setmean ,
32- getmean = getmean )
33- }
3421
3522# # This function computes the inverse of the special "matrix"
3623# #returned by makeCacheMatrix above.
@@ -47,15 +34,3 @@ cacheSolve <- function(x, ...) {
4734 x $ setinv(I )
4835 I
4936}
50-
51- cachemean <- function (x , ... ) {
52- m <- x $ getmean()
53- if (! is.null(m )) {
54- message(" getting cached data" )
55- return (m )
56- }
57- data <- x $ get()
58- m <- mean(data , ... )
59- x $ setmean(m )
60- m
61- }
You can’t perform that action at this time.
0 commit comments