-
Notifications
You must be signed in to change notification settings - Fork 144k
Open
Description
makeMatrix<-function(x=numeric()){
m<-NULL
set<-function(y){
x<<-y
m<<-NULL
}
get<-function() x
setinverse<-function(inverse) m<<-inverse
getinverse<-function() m
list(set=set,get=get,setinverse=setinverse,getinverse=getinverse)
}
cashemean<-function(x,...){
m<-x$getinverse()
if(!is.null(m)){
message("getting cashed data")
return(m)
}
data<-x$get()
m<-solve(data,...)
x$setinverse(m)
m
}
Metadata
Metadata
Assignees
Labels
No labels