
Last chance! 50% off unlimited learning
Sale ends in
Fast computation of crossprod(rowSums(X),Y)
rowSumsCrossprod(X, Y, transposeY)
A vector of length m.
A matrix with dimensions n*k. Hence the result of rowSums(X)
has length n.
A matrix with dimenions n*m. Can be a matrix with dimension m*n but then transposeY
should be TRUE
.
Logical. If TRUE
transpose Y before matrix multiplication.
Thomas Alexander Gerds <tag@biostat.ku.dk>
x <- matrix(1:10,nrow=5)
y <- matrix(1:20,ncol=4)
rowSumsCrossprod(x,y,0)
x <- matrix(1:10,nrow=5)
y <- matrix(1:20,ncol=5)
rowSumsCrossprod(x,y,1)
Run the code above in your browser using DataLab