crossprod                package:base                R Documentation

_M_a_t_r_i_x _C_r_o_s_s_p_r_o_d_u_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Given matrices `x' and `y' as arguments, `crossprod' returns their
     matrix cross-product. This is formally equivalent to, but faster
     than, the call `t(x) %*% y'.

_U_s_a_g_e:

     crossprod(x, y=x)

_S_e_e _A_l_s_o:

     `%*%' and outer product `%o%'.

_E_x_a_m_p_l_e_s:

     crossprod(1:4)    # = sum(1 + 2^2 + 3^2 + 4^2)
     drop(.Last.value) # scalarized

