Skip to content

Commit 6cdc3ee

Browse files
committed
Final checks
1 parent 0e8062e commit 6cdc3ee

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

cachematrix.R

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
i## First check if MASS package is installed
1+
## First check if MASS package is installed
22

33
if (!is.element('MASS', installed.packages()[,1]))
44
{
55
install.packages('MASS')
6-
}
7-
else
8-
{
9-
print ("MASS package already installed")
10-
}
11-
library(MASS)
12-
6+
}
7+
else
8+
{
9+
print ("MASS package already installed")
10+
}
11+
library(MASS)
1312

1413
## Below are two functions that are used to create a special object that stores
1514
## a numeric matrix and cache it's inverse
@@ -29,8 +28,6 @@ if (!is.element('MASS', installed.packages()[,1]))
2928
## - set the values of the inverse matrix
3029
## - get the values of the inverse matrix
3130

32-
33-
3431
makeCacheMatrix <- function(x = matrix()) {
3532
inverse <- NULL
3633
set <- function(y) {
@@ -46,6 +43,7 @@ makeCacheMatrix <- function(x = matrix()) {
4643

4744
}
4845

46+
4947
## The following function calculates the inverse of
5048
## the matrix, stored in the list that is created
5149
## with the above function

0 commit comments

Comments
 (0)