Skip to content

aorillio/ProgrammingAssignment2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

##Begin peer reviewed submission - A. Orillion

Caching the inverse of a matrix - these functions will partially fullful the

Coursera Data Science: R Programming Week 3 Assignment; GitHub user: aorillio

This function creates a special "matrix" object that can cache its inverse

makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setInverse <- function(solveMatrix) inv <<- solveMatrix getInverse <- function() inv list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) }

This function computes the inverse of the special "matrix" returned by

makeCacheMatrix above.

cacheSolve <- function(x, ...) { inv <- x$getInverse() if(!is.null(inv)) { message("getting cached data") return(inv) } data <-x$get() inv <- solve(data) x$setInverse(inv) inv }

##End A. Orillion submission

About

Repository for Programming Assignment 2 for R Programming on Coursera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • R 100.0%