Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Repository for Programming Assignment 2 for R Programming on Coursera

Notifications You must be signed in to change notification settings

benno001/ProgrammingAssignment2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Using the function

makeCacheMatrix returns a list of functions that enable the user to:

  • set the value of the vector
  • get the value of the vector
  • set the value of the mean
  • get the value of the mean

The input for makeCacheMatrix must be a square matrix.

cacheSolve returns the inverted matrix. When already cached, it retrieves from the cache. Else, it will compute a new inverted matrix.

Example input:

exampleVector <- seq(1:4)

exampleMatrix <- matrix(exampleVector, 2)

exampleCacheMatrix <- makeCacheMatrix(exampleMatrix)

cacheSolve(exampleCacheMatrix)

Example output:

 [,1] [,2]
 
[1,]   -2  1.5

[2,]    1 -0.5

About

Repository for Programming Assignment 2 for R Programming on Coursera

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%