Skip to content

Commit bef8420

Browse files
committed
Added check if MASS package is installed
1 parent e4eed41 commit bef8420

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

cachematrix.R

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
i## First check if MASS package is installed
2+
3+
if (!is.element('MASS', installed.packages()[,1]))
4+
{
5+
install.packages('MASS')
6+
}
7+
else
8+
{
9+
print ("MASS package already installed")
10+
}
11+
library(MASS)
12+
13+
114
## Put comments here that give an overall description of what your
215
## functions do
316

0 commit comments

Comments
 (0)