all-methods              package:Matrix              R Documentation

"_M_a_t_r_i_x" _M_e_t_h_o_d_s _f_o_r _F_u_n_c_t_i_o_n_s _a_l_l() _a_n_d _a_n_y()

_D_e_s_c_r_i_p_t_i_o_n:

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

_M_e_t_h_o_d_s:

     _a_l_l 'signature(x = "Matrix")': ...

     _a_n_y 'signature(x = "Matrix")': ...

     _a_l_l 'signature(x = "ldenseMatrix")': ...

     _a_l_l 'signature(x = "lsparseMatrix")': ...

_E_x_a_m_p_l_e_s:

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

