powered by
Fast computation of crossprod(colSums(X),Y)
colSumsCrossprod(X, Y, transposeY)
A matrix with dimensions k*n. Hence the result of colSums(X) has length n.
colSums(X)
A matrix with dimenions n*m. Can be a matrix with dimension m*n but then transposeY should be TRUE.
transposeY
TRUE
Logical. If TRUE transpose Y before matrix multiplication.
A vector of length m.
x <- matrix(1:8,ncol=2) y <- matrix(1:16,ncol=8) colSumsCrossprod(x,y,0) x <- matrix(1:8,ncol=2) y <- matrix(1:16,ncol=2) colSumsCrossprod(x,y,1)
Run the code above in your browser using DataLab