R/no.intercept.R

Defines functions no.intercept

Documented in no.intercept

no.intercept <- function(mm) 
{
  if(attributes(mm)$assign[1] == 0) {
    remove.int <- which(attributes(mm)$assign == 0)
    mm <- mm[, -remove.int, drop = FALSE]
    attributes(mm) <- list(dim = dim(mm), dimnames = dimnames(mm), 
                           assign = attributes(mm)$assign[-remove.int])
  } else return(mm)
  mm
}

Try the mvdalab package in your browser

Any scripts or data that you put into this service are public.

mvdalab documentation built on Oct. 6, 2022, 1:05 a.m.