QR: QR decomposition

33-QR decompositionR Documentation

QR decomposition

Description

QR factorization and related functions.

Usage

## S4 method for signature 'Rcpp_MPCR'
qr(x, tol = 1e-07)

## S4 method for signature 'ANY'
qr.Q(qr, complete = FALSE, Dvec)

## S4 method for signature 'ANY'
qr.R(qr, complete = FALSE)

Arguments

x

An MPCR matrix.

qr

QR decomposition MPCR object.

tol

The tolerance for determining numerical column rank.

complete

Should the complete or truncated factor be returned?

Dvec

Vector of diagonals to use when re-constructing Q (default is 1's).

Details

The factorization is performed by the LAPACK routine geqp3(). This should be similar to calling qr() on an ordinary R matrix with the argument LAPACK=TRUE.

Value

qr

Output of qr().

Examples

## Not run: 

library(MPCR)


qr_input <-as.MPCR( c(1, 2, 3, 2, 4, 6, 3, 3, 3),3,3,"single")
qr_out <- qr(qr_input)
qr_out
qr_out[["qr"]]$PrintValues()
qr_out[["qraux"]]$PrintValues()
qr_out[["pivot"]]$PrintValues()
qr_out[["rank"]]$PrintValues()

qr_q <- qr.Q(qr_out)
qr_q

## End(Not run)

MPCR documentation built on Aug. 23, 2026, 5:10 p.m.

Related to QR in MPCR...