all-methods {Matrix}R Documentation

"Matrix" Methods for Functions all() and any()

Description

The basic R functions all and any now have methods for Matrix objects and should behave as for matrix ones.

Methods

all
signature(x = "Matrix"): ...
any
signature(x = "Matrix"): ...
all
signature(x = "ldenseMatrix"): ...
all
signature(x = "lsparseMatrix"): ...

Examples

M <- Matrix(1:12 +0, 3,4)
all(M >= 1) # TRUE
any(M < 0 ) # FALSE

[Package Matrix version 0.9975-7 Index]