R/delintercept.R

delintercept <- function (mm) 
{
    saveattr <- attributes(mm)
    intercept <- which(saveattr$assign == 0)
    if (!length(intercept)) 
        return(mm)
    mm <- mm[, -intercept, drop = FALSE]
    saveattr$dim <- dim(mm)
    saveattr$dimnames <- dimnames(mm)
    saveattr$assign <- saveattr$assign[-intercept]
    attributes(mm) <- saveattr
    mm
}

Try the chemometrics package in your browser

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

chemometrics documentation built on Aug. 25, 2023, 5:18 p.m.