rowSumsCrossprod {riskRegression} | R Documentation |
Apply crossprod and rowSums
Description
Fast computation of crossprod(rowSums(X),Y)
Usage
rowSumsCrossprod(X, Y, transposeY)
Arguments
X |
A matrix with dimensions n*k. Hence the result of |
Y |
A matrix with dimenions n*m. Can be a matrix with dimension m*n but then |
transposeY |
Logical. If |
Value
A vector of length m.
Author(s)
Thomas Alexander Gerds <tag@biostat.ku.dk>
Examples
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)
[Package riskRegression version 2023.12.21 Index]