[-methods               package:Matrix               R Documentation

_M_e_t_h_o_d_s _f_o_r "[": _E_x_t_r_a_c_t_i_o_n _o_r _S_u_b_s_e_t_t_i_n_g _i_n _P_a_c_k_a_g_e '_M_a_t_r_i_x'

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

     Methods for '"["', i.e., extraction or subsetting mostly of
     matrices, in package 'Matrix'.

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

     There are more than these:

     _x = "_M_a_t_r_i_x", _i = "_m_i_s_s_i_n_g", _j = "_m_i_s_s_i_n_g", _d_r_o_p= "_A_N_Y" ... 

     _x = "_M_a_t_r_i_x", _i = "_n_u_m_e_r_i_c", _j = "_m_i_s_s_i_n_g", _d_r_o_p= "_m_i_s_s_i_n_g" ... 

     _x = "_M_a_t_r_i_x", _i = "_m_i_s_s_i_n_g", _j = "_n_u_m_e_r_i_c", _d_r_o_p= "_m_i_s_s_i_n_g" ... 

     _x = "_d_s_p_a_r_s_e_M_a_t_r_i_x", _i = "_m_i_s_s_i_n_g", _j = "_n_u_m_e_r_i_c", _d_r_o_p= "_l_o_g_i_c_a_l" 
          ... 

     _x = "_d_s_p_a_r_s_e_M_a_t_r_i_x", _i = "_n_u_m_e_r_i_c", _j = "_m_i_s_s_i_n_g", _d_r_o_p= "_l_o_g_i_c_a_l" 
          ... 

     _x = "_d_s_p_a_r_s_e_M_a_t_r_i_x", _i = "_n_u_m_e_r_i_c", _j = "_n_u_m_e_r_i_c", _d_r_o_p= "_l_o_g_i_c_a_l" 
          ... 

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

     '[<--methods' for sub_assign_ment to '"Matrix"' objects. 'Extract'
     about the standard extraction.

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

     str(m <- Matrix(round(rnorm(7*4),2), nrow = 7))
     stopifnot(identical(m, m[]))
     m[2, 3]   # simple number
     m[2, 3:4] # simple numeric of length 2
     m[2, 3:4, drop=FALSE] # sub matrix of class 'dgeMatrix'
     ## rows or columns only:
     m[1,]     # first row, as simple numeric vector
     m[,1:2]   # sub matrix of first two columns

     showMethods("[", inherited = FALSE)

