code: @Override
      public ZMatrixRMaj getR(ZMatrixRMaj R, boolean compact) {
          if( compact )
              R = UtilDecompositons_ZDRM.checkZerosLT(R,minLength,numCols);
          else
              R = UtilDecompositons_ZDRM.checkZerosLT(R,numRows,numCols);
  
          for( int j = 0; j < numCols; j++ ) {
              double colR[] = dataQR[j];
              int l = Math.min(j,numRows-1);
              for( int i = 0; i <= l; i++ ) {
                  R.set(i,j,colR[i*2],colR[i*2+1]);
              }
          }
  
          return R;
      }
docs: Returns an upper triangular matrix which is the R in the QR decomposition.  If compact then the input
  expected to be size = [min(rows,cols) , numCols] otherwise size = [numRows,numCols].
  
  @param R Storage for upper triangular matrix.
  @param compact If true then a compact matrix is expected.