drop0                 package:Matrix                 R Documentation

_D_r_o_p "_E_x_p_l_i_c_i_t _Z_e_r_o_e_s" _f_r_o_m _a _S_p_a_r_s_e _M_a_t_r_i_x

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

     Returns a sparse matrix with no "explicit zeroes", i.e., all zero
     or 'FALSE' entries are dropped from the explicitly indexed matrix
     entries.

_U_s_a_g_e:

     drop0(x, clx = c(class(x)))

_A_r_g_u_m_e_n_t_s:

       x: a Matrix, typically sparse, i.e., inheriting from
          'sparseMatrix'.

     clx: [optional:] the 'class' or "class definition" (see
          'getClassDef'; it is of class 'classRepresentation') of 'x'.
           This argument just exists for the possibility of speedup.

_V_a_l_u_e:

     a Matrix like 'x' but with no explicit zeros, i.e., '!any(x@x ==
     0)', always inheriting from 'CsparseMatrix'.

_S_e_e _A_l_s_o:

     'spMatrix', class 'sparseMatrix'

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

     m <- spMatrix(10,20, i= 1:8, j=2:9,
                   x = c(0:2,3:-1))
     m
     drop0(m)

