crossprod: Cross-product of large sparse matrices

View source: R/crossprod.R

crossprodR Documentation

Cross-product of large sparse matrices

Description

Compute the (transposed) cross-product of large sparse matrices using the same infrastructure as simil() and dist().

Usage

crossprod(x, y = NULL, min_prod = NULL, sparse = TRUE, digits = 14)

tcrossprod(x, y = NULL, min_prod = NULL, sparse = TRUE, digits = 14)

Arguments

x

a base::matrix or Matrix::Matrix object. Only sparse matrices are covered to the Matrix::CsparseMatrix internally.

y

if a base::matrix or Matrix::Matrix object is provided, proximity between documents or features in x and y is computed.

min_prod

the minimum product to be recorded.

sparse

if TRUE, returns Matrix::sparseMatrix object. When neither min_simil nor rank is used, dense matrices require less space in RAM.

digits

determines rounding of small values towards zero. Use primarily to correct floating point errors. Rounding is performed in C++ in a similar way as base::zapsmall.

Value

a Matrix::Matrix object


proxyC documentation built on Oct. 30, 2026, 9:08 a.m.