facmul(x, factor, y, transpose = FALSE, left = TRUE, ...)
FALSE
(the default) the factor is
applied. When TRUE
the transpose of the factor is applied.TRUE
(the default) the factor is
applied from the left. When FALSE
the factor is applied
from the right."qr.Matrix"
has additional arguments.y
lu
and qr
can be
stored in a compact form.
The function facmul
allows multiplication without explicit
formation of the factors, saving both storage and operations.library(Matrix)
x <- Matrix(rnorm(9), 3, 3)
qrx <- qr(x) # QR factorization of x
y <- rnorm(3)
facmul( qr(x), factor = "Q", y) # form Q y
Run the code above in your browser using DataLab