Learn R Programming

Matrix (version 0.9-1)

tcrossprod: Cross-product of transpose

Description

Take the cross-product of the transpose of a matrix. This is formally equivalent to, but faster than, the call x %*% t(x).

Usage

tcrossprod(x)

Arguments

x
a matrix-like object

Value

  • An object of an appropriate symmetric matrix class.

Details

For some classes in the Matrix package, such as the cscMatrix-class, it is much faster to calculate the cross-product of the transpose directly instead of calculating the transpose first and then its cross-product.

See Also

crossprod