Null package:MASS R Documentation _N_u_l_l _S_p_a_c_e_s _o_f _M_a_t_r_i_c_e_s _D_e_s_c_r_i_p_t_i_o_n: Given a matrix, 'M', find a matrix 'N' giving a basis for the null space. That is 't(N) %*% M' is the zero and 'N' has the maximum number of linearly independent columns. _U_s_a_g_e: Null(M) _A_r_g_u_m_e_n_t_s: M: Input matrix. A vector is coerced to a 1-column matrix. _V_a_l_u_e: The matrix 'N' with the basis for the null space, or an empty vector if the matrix 'M' is square and of maximal rank. _R_e_f_e_r_e_n_c_e_s: Venables, W. N. and Ripley, B. D. (2002) _Modern Applied Statistics with S._ Fourth edition. Springer. _S_e_e _A_l_s_o: 'qr', 'qr.Q'. _E_x_a_m_p_l_e_s: # The function is currently defined as function(M) { tmp <- qr(M) set <- if(tmp$rank == 0) 1:ncol(M) else - (1:tmp$rank) qr.Q(tmp, complete = TRUE)[, set, drop = FALSE] }