QR() converts an rxc matrix A into the product QR, where Q is rxc of orthogonal columns, and R is an upper triangular cxc matrix. The routine stops if a zero diagonal element of R is produced. The function produces Q by default, but supplying makeq=FFALSE turns this option off. Typically the QR reduction is used to reduce a X matrix in regression to avoid round off error in calculating X'X. The X matrix has at least as many rows as columns, so there is some savings in calculating Q as Q = XR-1. You should turn off the calculation of Q if finding R-1 is prohibitive, or if only R is needed. Its use in regression may be improved by pivoting zero diagonal elements of R. (See [15] for more). The program is a translation of an Algol program found in [22].