matvec                 package:limma                 R Documentation

_M_u_l_t_i_p_l_y _a _M_a_t_r_i_x _b_y _a _V_e_c_t_o_r

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

     Multiply the rows or columns of a matrix by the elements of a
     vector.

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

     matvec(M, v)
     vecmat(v, M)

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

       M: numeric matrix, or object which can be coerced to a matrix.

       v: numeric vector, or object which can be coerced to a vector.
          Length should match the number of columns of 'M' (for
          'matvec') or the number of rows of 'M' (for 'vecmat')

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

     'matvec(M,v)' is equivalent to 'M %*% diag(v)' but is faster to
     execute. Similarly 'vecmat(v,M)' is equivalent to 'diag(v) %*% M'
     but is faster to execute.

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

     A matrix of the same dimensions as 'M'.

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

     Gordon Smyth

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

     A <- matrix(1:12,3,4)
     A
     matvec(A,c(1,2,3,4))
     vecmat(c(1,2,3),A)

