Skip to content

Commit 2056a49

Browse files
committed
final version
1 parent 51e9a13 commit 2056a49

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

cachematrix.R

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff 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-
}

0 commit comments

Comments
 (0)