prmatrix                package:base                R Documentation

_P_r_i_n_t _M_a_t_r_i_c_e_s, _O_l_d-_s_t_y_l_e

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

     An earlier method for printing matrices, provided for S
     compatibility.

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

     prmatrix(x, rowlab =, collab =,
              quote = TRUE, right = FALSE, na.print = NULL, ...)

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

       x: numeric or character matrix.

rowlab,collab: (optional) character vectors giving row or column names
          respectively.  By default, these are taken from
          'dimnames(x)'.

   quote: logical; if 'TRUE' and 'x' is of mode '"character"', _quotes_
          ('"') are used.

   right: if 'TRUE' and 'x' is of mode '"character"', the output
          columns are _right_-justified.

na.print: how 'NA's are printed.  If this is non-null, its value is
          used to represent 'NA'.

     ...: arguments for 'print' methods.

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

     'prmatrix' is an earlier form of 'print.matrix', and is very
     similar to the S function of the same name.

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

     Invisibly returns its argument, 'x'.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

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

     'print.default', and other 'print' methods.

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

     prmatrix(m6 <- diag(6), row = rep("",6), coll=rep("",6))

     chm <- matrix(scan(system.file("help", "AnIndex", package = "splines"),
                        what = ""), , 2, byrow = TRUE)
     chm  # uses print.matrix()
     prmatrix(chm, collab = paste("Column",1:3), right=TRUE, quote=FALSE)

