*** l1ce.q.01	Mon Apr  8 17:36:28 2002
--- l1ce.q	Mon Apr 12 10:30:33 2004
***************
*** 90,96 ****
          if( X.so.qr$rank != ncol(X.sweep.out) )
              warning("Matrix built from variables in `sweep.out' is rank deficient")
  
!         X.so.coef  <- qr.coef  (X.so.qr, Y.to.C)
          X.so.X     <- qr.coef  (X.so.qr, X.to.C)
          X.so.Y.fit <- qr.fitted(X.so.qr, Y.to.C)
          X.to.C     <- qr.resid (X.so.qr, X.to.C)
--- 90,96 ----
          if( X.so.qr$rank != ncol(X.sweep.out) )
              warning("Matrix built from variables in `sweep.out' is rank deficient")
  
!         X.so.coefficients  <- qr.coef  (X.so.qr, Y.to.C)
          X.so.X     <- qr.coef  (X.so.qr, X.to.C)
          X.so.Y.fit <- qr.fitted(X.so.qr, Y.to.C)
          X.to.C     <- qr.resid (X.so.qr, X.to.C)
***************
*** 166,181 ****
  
          if(something.to.sweep.out) {
              fit$fitted.values <- fit$fitted.values + X.so.Y.fit
!             X.so.coef <- X.so.coef - X.so.X %*% fit$coefficients
  
              tmp <- fit$coefficients
              fit$coefficients <- rep(0,ncol(X))
              names(fit$coefficients) <- dimnames(X)[[2]]
              fit$coefficients[X.names] <- tmp
!             names(X.so.coef) <- X.sweep.out.names
              ind <- names(fit$coefficients[name.matches])
              ##orig 1999 code : fit$coefficients[name.matches] <- X.so.coeff[ind]
!             fit$coefficients[name.matches] <- X.so.coef[ind]
  
              fit$sweep.out <- list(sweep.out = sweep.out,
                                    X.sweep.out.names = X.sweep.out.names,
--- 166,181 ----
  
          if(something.to.sweep.out) {
              fit$fitted.values <- fit$fitted.values + X.so.Y.fit
!             X.so.coefficients <- X.so.coefficients - X.so.X %*% fit$coefficients
  
              tmp <- fit$coefficients
              fit$coefficients <- rep(0,ncol(X))
              names(fit$coefficients) <- dimnames(X)[[2]]
              fit$coefficients[X.names] <- tmp
!             names(X.so.coefficients) <- X.sweep.out.names
              ind <- names(fit$coefficients[name.matches])
              ##orig 1999 code : fit$coefficients[name.matches] <- X.so.coeff[ind]
!             fit$coefficients[name.matches] <- X.so.coefficients[ind]
  
              fit$sweep.out <- list(sweep.out = sweep.out,
                                    X.sweep.out.names = X.sweep.out.names,
***************
*** 255,261 ****
  
              if(something.to.sweep.out) {
                  fit$fitted.values <- fit$fitted.values + X.so.Y.fit
!                 X.so.coef <- X.so.coef - X.so.X %*% fit$coefficients
  
                  tmp <- fit$coefficients
                  fit$coefficients <- rep(0,ncol(X))
--- 255,261 ----
  
              if(something.to.sweep.out) {
                  fit$fitted.values <- fit$fitted.values + X.so.Y.fit
!                 X.so.coef <- X.so.coefficients - X.so.X %*% fit$coefficients
  
                  tmp <- fit$coefficients
                  fit$coefficients <- rep(0,ncol(X))
