spam (version 2.10-0)

crossprod: Spam Matrix Crossproduct

Description

Given matrices x and y as arguments, return a matrix cross-product. This is formally equivalent to (but usually slightly faster than) the call t(x) %*% y (crossprod.spam) or x %*% t(y) (tcrossprod.spam).

Usage

crossprod.spam(x, y = NULL, ...)
     
     tcrossprod.spam(x, y = NULL, ...)

Value

A double matrix

Arguments

x, y

matrices: y = NULL is taken to be the same matrix as x. Vectors are promoted to single-column or single-row matrices, depending on the context.

...

potentially further arguments from other methods.

Author

Reinhard Furrer

Examples

Run this code
crossprod.spam(diag.spam(2),1:2)

Run the code above in your browser using DataLab