namedSparse-class         package:ontoTools         R Documentation

_C_l_a_s_s "_n_a_m_e_d_S_p_a_r_s_e" _a_d_d_s _m_a_r_g_i_n _n_a_m_e_s _t_o _s_p_a_r_s_e _m_a_t_r_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     manages margin names for sparse matrices

_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("namedSparse",
     ...)'. These are S4 objects that include a SparseM::matrix.csr,
     associated dimnames in the customary form, and two lists of
     name-to-index mapping environments (for row and column name
     resolution, with forward (name to index) and backward (index to
     name) mapping).

_S_l_o_t_s:

     '_D_i_m_n_a_m_e_s': Object of class '"list"' ordinary dimnames matrix
          metadata 

     '_m_a_t': Object of class '"matrix.csr"' sparse matrix 

_M_e_t_h_o_d_s:

     _A_r_i_t_h 'signature(e1 = "namedSparse", e2 = "namedSparse")': ... 

     _s_h_o_w 'signature(object = "namedSparse")': ... 

_N_o_t_e:

     A constructor makeNamedSparse is illustrated in the example.

_A_u_t_h_o_r(_s):

     VJ Carey <stvjc@channing.harvard.edu>

_E_x_a_m_p_l_e_s:

     data(A.csr)
     namedA <- mkNS(A.csr) # installs default dimnames R{1:nrow}, C{1:ncol}
     print(namedA)
     print(colSums(namedA))
     dimnames(namedA) <- list(paste("A",1:10,sep=""),paste("B",1:5,sep=""))
     print(namedA)
     print(namedA %*% t(namedA))

