sparseQR-class package:Matrix R Documentation _S_p_a_r_s_e _Q_R _d_e_c_o_m_p_o_s_i_t_i_o_n _o_f _a _s_p_a_r_s_e _m_a_t_r_i_x _D_e_s_c_r_i_p_t_i_o_n: Objects of this class represent a QR decomposition of a sparse rectangular matrix. _O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s: Objects can be created by calls of the form 'new("sparseQR", ...)' but are more commonly created by function 'qr' applied to a sparse matrix such as a matrix of class 'dgCMatrix'. _S_l_o_t_s: '_V': Object of class '"dgCMatrix"'. The columns of 'V' are the vectors that generate the Householder transformations of which the matrix Q is composed. '_b_e_t_a': Object of class '"numeric"', the normalizing factors for the Householder transformations. '_p': Object of class '"integer"': Permutation (of '0:(n-1)') applied to the rows of the original matrix. '_R': Object of class '"dgCMatrix"' An upper triangular matrix of dimension '_q': Object of class '"integer"': Permutation applied from the right. Can be of length 0 which implies no permutation. _M_e_t_h_o_d_s: _q_r._R 'signature(qr = "sparseQR")': ... _q_r._c_o_e_f 'signature(qr = "sparseQR", y = "dgeMatrix")': ... _q_r._c_o_e_f 'signature(qr = "sparseQR", y = "matrix")': ... _q_r._c_o_e_f 'signature(qr = "sparseQR", y = "numeric")': ... _q_r._f_i_t_t_e_d 'signature(qr = "sparseQR", y = "dgeMatrix")': ... _q_r._f_i_t_t_e_d 'signature(qr = "sparseQR", y = "matrix")': ... _q_r._f_i_t_t_e_d 'signature(qr = "sparseQR", y = "numeric")': ... _q_r._q_t_y 'signature(qr = "sparseQR", y = "dgeMatrix")': ... _q_r._q_t_y 'signature(qr = "sparseQR", y = "matrix")': ... _q_r._q_t_y 'signature(qr = "sparseQR", y = "numeric")': ... _q_r._q_y 'signature(qr = "sparseQR", y = "dgeMatrix")': ... _q_r._q_y 'signature(qr = "sparseQR", y = "matrix")': ... _q_r._q_y 'signature(qr = "sparseQR", y = "numeric")': ... _q_r._r_e_s_i_d 'signature(qr = "sparseQR", y = "dgeMatrix")': ... _q_r._r_e_s_i_d 'signature(qr = "sparseQR", y = "matrix")': ... _q_r._r_e_s_i_d 'signature(qr = "sparseQR", y = "numeric")': ... _s_o_l_v_e 'signature(a = "sparseQR", b = "ANY")': simply uses 'qr.coef(a,b)'. _N_o_t_e: The decomposition is of the form 'A[p+1,] == Q %*% R', if the 'q' slot if of length 0 or 'A[p+1,q+1] == Q %*% R' where A is a sparse m by n matrix (m >= n), R is an m by n matrix that is zero below the main diagonal. The 'p' slot is a 0-based permutation of '1:m' applied to the rows of the original matrix. If the 'q' slot has length 'n' it is a 0-based permutation of '1:n' applied to the columns of the original matrix to reduce the amount of "fill-in" in the matrix R. The matrix Q is a "virtual matrix". It is the product of n Householder transformations. The information to generate these Householder transformations is stored in the 'V' and 'beta' slots. The '"sparseQR"' methods for the 'qr.*' functions return objects of class '"dgeMatrix"' (see 'dgeMatrix'). Results from 'qr.coef', 'qr.resid' and 'qr.fitted' (when 'k == ncol(R)') are well-defined and should match those from the corresponding dense matrix calculations. However, because the matrix 'Q' is not uniquely defined, the results of 'qr.qy' and 'qr.qty' do not necessarily match those from the corresponding dense matrix calculations. Also, the results of 'qr.qy' and 'qr.qty' apply to the permuted column order when the 'q' slot has length 'n'. _S_e_e _A_l_s_o: 'qr', 'qr.Q', 'qr.R', 'qr.fitted', 'qr.resid', 'qr.coef', 'qr.qty', 'qr.qy', 'dgCMatrix', 'dgeMatrix'. _E_x_a_m_p_l_e_s: data(KNex); mm <- KNex$mm str(mmQR <- qr(mm))