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)

