Skip to content

Benlagra/ProgrammingAssignment2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Programming Assignment 02

This repository contains the required file for the 2nd programming assignment of the Coursera course R programming.

It has been forked from the repository of Prof. Peng as required in the brief of the assignment.

The file cachematrix.R defines two functions used to cache a given matrix and its inverse.

  • The first function makeCacheMatrix creates an extended 'matrix' object which retains the information about the input matrix and its inverse (The latter being NULL if it hasn't been calculated already) in the form of a list of functions.

  • The second function cacheSolve, whose argument is the extended object defined by the first function, is a cached version of the function Solve. If the cached inverse matrix hasn't been calculated, cacheSolve uses Solve to calculate it then caches the result in the extended 'matrix' format. Otherwise, it just returns the cached inverse matrix with an appropriate message. Overall, for a given matrix, the Solve function is called once only even if the function cacheSolve is called multiple times.

Further explanatory comments and precisions are included in the file itself.

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%