The R Project SVN R

Rev

Rev 72710 | Rev 80026 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72710 Rev 77414
Line 228... Line 228...
228
        e1@M + e2@M
228
        e1@M + e2@M
229
    })
229
    })
230
    M+M # works the first time
230
    M+M # works the first time
231
    M+M # was error   "object '.Generic' not found"
231
    M+M # was error   "object '.Generic' not found"
232
    ##
232
    ##
-
 
233
    as.Matrix <- function(x) `dimnames<-`(as.matrix(x), list(NULL,NULL))
233
    stopifnot(
234
    stopifnot(exprs = {
234
        identical(pmin(2,M), pmin(2, as.matrix(M))),
235
        identical(pmin(2,M), pmin(2, as.matrix(M)))
235
        identical(as.matrix(pmax(M, 7)), pmax(as.matrix(M), 7))
236
        identical(as.matrix(pmax(M, 7)),
-
 
237
                  pmax(as.Matrix(M), 7))
236
    )
238
    })
237
    rm(M)
239
    rm(M)
238
    detach("package:Matrix", unload=TRUE)
240
    detach("package:Matrix", unload=TRUE)
239
}##{Matrix}
241
}##{Matrix}