matrixIndex-class       package:externalVector       R Documentation

_C_l_a_s_s "_m_a_t_r_i_x_I_n_d_e_x", _i_n_d_e_x _c_l_a_s_s _r_e_p_r_e_s_e_n_t_i_n_g _a _s_e_t _o_f _r_o_w _a_n_d
_c_o_l_u_m_n _s_u_b_s_c_r_i_p_t_s _f_o_r _a _m_a_t_r_i_x

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

     Objects of class '"matrixIndex"' represent subscripts
     corresponding to a submatrix of some matrix of a given size. Like
     the '"vectorIndex"' subclasses, this is a class for internal use.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("matrixIndex",
     row, col, origdim, Names)'.

_S_l_o_t_s:

     '_r_o_w': Object of class '"vectorIndex"', the row subscript. 

     '_c_o_l': Object of class '"vectorIndex"', the column subscript. 

     '_o_r_i_g_d_i_m': Object of class '"integer"', the dimension of the full
          matrix. 

     '_N_a_m_e_s': Object of class '"vectorNamesType"', names for the
          submatrix elements when the submatrix is treated as vectors. 

_E_x_t_e_n_d_s:

     Class '"externalVector"', directly.

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

     Signature components for the methods are:

       x        The class "allIndex"
       scalar   Length one positive "integer"
       i        The class "ANY"
       j        The class "ANY"
       drop     The class "logical"
       value    The class "ANY"
       .Object  The class "allIndex"

     _x[_i, _j, _d_r_o_p=_F_A_L_S_E] Create another object of cloass 'matrixIndex'
          with same 'origdims' represents a further submatrix of the
          full matrix. If 'drop' is 'TRUE' and at least one of the
          dimensions of the answer is '1', the answer is an object of
          class '"vectorIndex"' instead. 

     _x[[_i]] Get the subscript representing the indices for dimension
          'i'. 

     _d_i_m(_x) Get the dimension of 'x'. 

     _d_i_m_n_a_m_e_s(_x) Get the dimnames of 'x'. 

     _l_e_n_g_t_h(_x) Get the length of 'x' considered as a vector. This is
          same as 'prod(dim(x))'. 

     _n_a_m_e_s(_x) Get the names of 'x'. 

     _s_e_t_D_i_m_N_a_m_e_s(_x, _v_a_l_u_e) Set the dimnames of 'x' and return the
          modified 'x'. 

     _s_e_t_N_a_m_e_s(_x, _v_a_l_u_e) Set the names of 'x' and return the modified
          'x'. 

     _a_s(_x, "_v_e_c_t_o_r_I_n_d_e_x") Coerce x to an object of class "vectorIndex". 

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

     'vectorIndex-class' for the class of row and column subscripts.

