{"comment":{"url":"https://api.github.com/repos/davidlu0517/baililu/comments/13454511","html_url":"https://github.com/davidlu0517/baililu/commit/911e4b5465bad748d565bd4321da1f1b5ad97320#commitcomment-13454511","id":13454511,"user":{"login":"davidlu0517","id":14856068,"avatar_url":"https://avatars.githubusercontent.com/u/14856068?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlu0517","html_url":"https://github.com/davidlu0517","followers_url":"https://api.github.com/users/davidlu0517/followers","following_url":"https://api.github.com/users/davidlu0517/following{/other_user}","gists_url":"https://api.github.com/users/davidlu0517/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlu0517/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlu0517/subscriptions","organizations_url":"https://api.github.com/users/davidlu0517/orgs","repos_url":"https://api.github.com/users/davidlu0517/repos","events_url":"https://api.github.com/users/davidlu0517/events{/privacy}","received_events_url":"https://api.github.com/users/davidlu0517/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"911e4b5465bad748d565bd4321da1f1b5ad97320","created_at":"2015-09-27T03:37:49Z","updated_at":"2015-09-27T03:37:49Z","body":"makeCacheMatrix <- function(x = matrix()) {\r\n  m<-NULL\r\n  set<-function(y){\r\n  x<<-y\r\n  m<<-NULL\r\n}\r\nget<-function() x\r\nsetmatrix<-function(solve) m<<- solve\r\ngetmatrix<-function() m\r\nlist(set=set, get=get,\r\n   setmatrix=setmatrix,\r\n   getmatrix=getmatrix)\r\n}\r\n\r\ncacheSolve <- function(x=matrix(), ...) {\r\n    m<-x$getmatrix()\r\n    if(!is.null(m)){\r\n      message(\"getting cached data\")\r\n      return(m)\r\n    }\r\n    matrix<-x$get()\r\n    m<-solve(matrix, ...)\r\n    x$setmatrix(m)\r\n    m\r\n}"}}