cbind                  package:spam                  R Documentation

_C_o_m_b_i_n_e _s_p_a_m _M_a_t_r_i_c_e_s _b_y _R_o_w_s _o_r _C_o_l_u_m_n_s

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

     Take a sequence of vector, matrix or 'spam' object arguments and
     combine by _c_olumns or _r_ows, respectively.

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

     cbind.spam(..., deparse.level = 0)
     rbind.spam(..., deparse.level = 0)

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

     ...: vectors, matrices or 'spam' objects. See Details and Value

deparse.level: for compatibility reason here. Only '0' is implemented.

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

     'rbind' and 'cbind' are not exactly symmetric in how the objects
     are processed. The former is essentially an concatenation of the
     slots due to the sparse storage format. Different types of inputs
     are handled differently. The former calls a Fortran routine after
     the input has been coerced to 'spam' objects. 

     Only two objects at a time are processed. If more than two are
     present, a loop concatenates them successively. 

     A method is defined for a  'spam' object as first argument.

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

     a 'spam' object combining the '...' arguments column-wise or
     row-wise.  (Exception: if there are no inputs or all the inputs
     are 'NULL', the value is 'NULL'.)

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

     Reinhard Furrer

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

     'cbind,spam-method'.

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

     x <- cbind.spam(1:5,6)

     y <- cbind(x, 7)

     # for some large matrices the following might be slightly faster:

     t( cbind( t(x), t(x)))

     ## Not run: 
     # Method is only defined for the first argument:
     cbind(diag(2),diag.spam(2))
     ## End(Not run)

