Skip to content

Commit c554448

Browse files
committed
Comments fix
Fixed examples of code in comments
1 parent 194cd08 commit c554448

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cachematrix.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Creating a special object for caching calculations
22
# example:
33
# m <- matrix(1:4,c(2,2))
4-
# mci <- makeCacheMatrix(m, func = function(m){message("calculating");solve(m)})
4+
# mci <- makeCacheMatrix({message("calculating");solve(m)})
55
# cacheSolve(mci)
66
# cacheSolve(mci) # should not print message again, should insted inform about cache use
7-
# mcs <- makeCacheMatrix(m, c(1,1), tol = .001)
7+
# mcs <- makeCacheMatrix(solve(m,c(1,1))
88
# cacheSolve(mcs)
99

1010
# Class for creating matrices with
@@ -19,7 +19,7 @@ CachedOps <- setRefClass("CachedOps",
1919
func <<- function(){
2020
expr
2121
}
22-
callSuper()
22+
callSuper(...)
2323
},
2424

2525
getResult = function(){

0 commit comments

Comments
 (0)