print                  package:spam                  R Documentation

_P_r_i_n_t_i_n_g _a_n_d _s_u_m_m_a_r_i_z_i_n_g _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:

     Printing (non-zero elements) of sparse matrices and summarizing
     the sparseness structure thereof.

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

       print(x, ...)
       summary(object, ...)

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

       x: matrix of class 'spam' or 'spam.chol.'_method_.

  object: matrix of class 'spam' or 'spam.chol.'_method_.

     ...: any other arguments passed to 'print.default'.

_D_e_t_a_i_l_s:

     'spam.getOption('printsize')' determines  if the sparse matrix is
     coerced into a matrix and the printed as an array or if only the
     non-zero elements of the matrix are given.

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

     'NULL' for 'print', because the information is printed with 'cat'
     there is no real need to pass any object back. 
      A list containing the non-zero elements and the density for
     'summary' for class 'spam'.
      A list containing the non-zero elements of the factor, the
     density and the fill-in for  'summary' for class
     'spam.chol.NgPeyton'.

_A_u_t_h_o_r(_s):

     Reinhard Furrer

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

     'spam.options'

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

     set.seed(13)
     nz <- 8
     ln <- nz
     smat <- spam(0,ln,ln)
     smat[cbind(sample(ln,nz),sample(ln,nz))] <- 1:nz

     par(mfcol=c(1,2),pty='s')
     spam.options( printsize=1000)
     print(smat)
     spam.options( printsize=10)
     print(smat)
     summary(smat)
     (summary(smat))

