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))

